pub trait Handler<M>: Actorwhere
M: Message,{
// Required method
async fn handle(
&self,
myself: &Mailbox<Self>,
message: M,
state: &mut Self::State,
) -> Result<(), Self::Error>;
}Available on crate feature
actor only.Expand description
Handles messages of type M for an actor.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".