pub trait Handler<M: Message> {
// Required method
fn deliver(&mut self, m: M) -> M::Reply;
}Expand description
Implement this trait to indicate that your service can process a specific message.
The deliver() method is passed a &mut self reference to the service,
making it very easy to update your state. You can optionally include a
reply.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".