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§
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.