pub struct ModularDispatcher { /* private fields */ }
Expand description
A dispatcher, that can be composed from other dispatchers.
Implementations§
Source§impl ModularDispatcher
impl ModularDispatcher
Sourcepub fn add<D: Dispatcher>(&mut self, dispatcher: D)
pub fn add<D: Dispatcher>(&mut self, dispatcher: D)
Adds a dispatcher.
Trait Implementations§
Source§impl Default for ModularDispatcher
impl Default for ModularDispatcher
Source§fn default() -> ModularDispatcher
fn default() -> ModularDispatcher
Returns the “default value” for a type. Read more
Source§impl Dispatcher for ModularDispatcher
impl Dispatcher for ModularDispatcher
Source§fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: Request,
tx: Option<&'life1 Sender<Message>>,
id: u64,
frame_type: Option<FrameType>,
) -> Pin<Box<dyn Future<Output = Option<ResponseAndSubScriptionNotifier>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: Request,
tx: Option<&'life1 Sender<Message>>,
id: u64,
frame_type: Option<FrameType>,
) -> Pin<Box<dyn Future<Output = Option<ResponseAndSubScriptionNotifier>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Calls the requested method with the request parameters and returns it’s return value (or error) as a response.
Source§fn method_names(&self) -> Vec<&str>
fn method_names(&self) -> Vec<&str>
Returns the names of all methods matched by this dispatcher.
Auto Trait Implementations§
impl Freeze for ModularDispatcher
impl !RefUnwindSafe for ModularDispatcher
impl Send for ModularDispatcher
impl Sync for ModularDispatcher
impl Unpin for ModularDispatcher
impl !UnwindSafe for ModularDispatcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more