pub trait Handler<M>where
Self: Actor,
M: Message,{
// Required method
fn handle(
&mut self,
msg: M,
ctx: &Context<Self>,
) -> impl Future<Output = ()> + Send;
}Expand description
The implementation for how an actor handles a particular message
An Actor, can implement the Handler trait any number of time, with a unique message type for
each implementation.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".