Trait meio::handlers::Handler[][src]

pub trait Handler<A: Actor>: Send + 'static {
    fn handle<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        actor: &'life1 mut A,
        _ctx: &'life2 mut Context<A>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn priority(&self) -> Priority { ... } }
Expand description

Internal Handler type that used by Actor’s routine to execute ActionHandler or InteractionHandler.

It has 'static lifetime, because every handler is boxed when sent to an Actor.

Required methods

Main method that expects a mutable reference to Actor that will be used by implementations to handle messages.

Provided methods

Returns priority of a handler.

Implementors