MessageFor

Trait MessageFor 

Source
pub trait MessageFor<A: Actor + ?Sized>: Send + 'static {
    // Required method
    fn handle<'life0, 'life1, 'async_trait>(
        self: Box<Self>,
        actor: &'life0 mut A,
        ctx: &'life1 mut A::Context,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( self: Box<Self>, actor: &'life0 mut A, ctx: &'life1 mut A::Context, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<A, E> MessageFor<A> for Event<E>
where A: OnEvent<E>, E: Send + 'static,