pub struct HandlerExecutor<Input, Output, Metadata> {
pub handlers: FnvHashMap<u64, Arc<dyn Handler<Input, Output, Metadata> + Send>>,
}Fields§
§handlers: FnvHashMap<u64, Arc<dyn Handler<Input, Output, Metadata> + Send>>Implementations§
Source§impl<Input, Output, Metadata> HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> HandlerExecutor<Input, Output, Metadata>
pub fn new() -> HandlerExecutor<Input, Output, Metadata>
pub fn add_handler( &mut self, handler_id: u64, handler: Arc<dyn Handler<Input, Output, Metadata> + Send>, ) -> &mut Self
pub async fn handle( &self, handler_chain: &Vec<u64>, input: Input, metadata: Option<Metadata>, ) -> Result<Output, ExecutorError>
Auto Trait Implementations§
impl<Input, Output, Metadata> Freeze for HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> !RefUnwindSafe for HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> !Send for HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> !Sync for HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> Unpin for HandlerExecutor<Input, Output, Metadata>
impl<Input, Output, Metadata> !UnwindSafe for HandlerExecutor<Input, Output, Metadata>
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