pub trait Handler<M: Message>: Actor {
    type Result: MessageResponse<M>;

    fn handle<'life0, 'async_trait>(
        &'life0 mut self,
        msg: M
    ) -> Pin<Box<dyn Future<Output = Self::Result> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Available on crate feature worker only.
Expand description

Trait for actor for handling specific message type without context

Required Associated Types§

Result of handler

Required Methods§

Message handler

Implementors§