Trait actix::prelude::MessageHandler [] [src]

pub trait MessageHandler<M> where
    Self: Actor
{ type Item; type Error; type InputError; fn handle(
        &mut self,
        msg: M,
        ctx: &mut Context<Self>
    ) -> MessageFuture<Self, M>; fn error(&mut self, err: Self::InputError, ctx: &mut Context<Self>) { ... } }

Associated Types

The type of value that this message will resolved with if it is successful.

The type of error that this message will resolve with if it fails in a normal fashion.

If message handler is used for handling messages from Future or Stream, then InputError type has to be set to correspondent Error

Required Methods

Method is called for every message received by this Actor

Provided Methods

Method is called on error.

Implementors