Allow access a method handler (#15601)
# Objective - I'm building a streaming plugin for `bevy_remote` and accessing to builtin method will be very valuable ## Solution - Add a method to allow access a handler by method name. ## Testing - CI should pass
This commit is contained in:
parent
7c6057bc69
commit
453c0167b2
@ -399,6 +399,11 @@ impl RemoteMethods {
|
||||
) -> Option<RemoteMethod> {
|
||||
self.0.insert(method_name.into(), handler)
|
||||
}
|
||||
|
||||
/// Retrieves a handler by method name.
|
||||
pub fn get(&self, method_name: &str) -> Option<&RemoteMethod> {
|
||||
self.0.get(method_name)
|
||||
}
|
||||
}
|
||||
|
||||
/// A single request from a Bevy Remote Protocol client to the server,
|
||||
|
Loading…
Reference in New Issue
Block a user