Trait apalis_core::worker::ContextHandler
source · pub trait ContextHandler<M: Message>: Actor {
type Result: MessageResponse<M>;
fn handle<'life0, 'life1, 'async_trait>(
&'life0 mut self,
ctx: &'life1 mut Context<Self>,
msg: M
) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Available on crate feature
worker only.Expand description
Trait for actor for handling specific message type
Required Associated Types§
sourcetype Result: MessageResponse<M>
type Result: MessageResponse<M>
Result of handler