pub struct SimpleMessageHandler<F, T>{ /* private fields */ }Implementations§
Source§impl<F, T> SimpleMessageHandler<F, T>where
F: Fn(T, MessageContext) -> MessageResult + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
impl<F, T> SimpleMessageHandler<F, T>where
F: Fn(T, MessageContext) -> MessageResult + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
Trait Implementations§
Source§impl<F, T> MessageHandler<T> for SimpleMessageHandler<F, T>where
F: Fn(T, MessageContext) -> MessageResult + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
impl<F, T> MessageHandler<T> for SimpleMessageHandler<F, T>where
F: Fn(T, MessageContext) -> MessageResult + Send + Sync + 'static,
T: DeserializeOwned + Send + Sync + 'static,
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
message: T,
context: MessageContext,
) -> Pin<Box<dyn Future<Output = MessageResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
message: T,
context: MessageContext,
) -> Pin<Box<dyn Future<Output = MessageResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a received message
Auto Trait Implementations§
impl<F, T> Freeze for SimpleMessageHandler<F, T>where
F: Freeze,
impl<F, T> RefUnwindSafe for SimpleMessageHandler<F, T>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<F, T> Send for SimpleMessageHandler<F, T>
impl<F, T> Sync for SimpleMessageHandler<F, T>
impl<F, T> Unpin for SimpleMessageHandler<F, T>
impl<F, T> UnwindSafe for SimpleMessageHandler<F, T>where
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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