pub trait Handler<M>where
Self: Actor,
M: Message,{
// Required method
fn handle(
&mut self,
msg: M,
ctx: &Context,
) -> 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§
Object Safety§
This trait is not object safe.