Skip to main content

OnMessage

Trait OnMessage 

Source
pub trait OnMessage<Ctx, M>: Send {
    // Required method
    fn on_message(
        &mut self,
        ctx: &mut Ctx,
        message: M,
    ) -> impl Future<Output = Result<Outcome<M, Never>, AnyError>> + Send;
}

Required Methods§

Source

fn on_message( &mut self, ctx: &mut Ctx, message: M, ) -> impl Future<Output = Result<Outcome<M, Never>, AnyError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§