Skip to main content

Handler

Trait Handler 

Source
pub trait Handler<M, R>: Send + Sync {
    // Required method
    fn handle(&mut self, message: M) -> Result<R, ActorError>;
}
Expand description

Handler trait for processing messages

Required Methods§

Source

fn handle(&mut self, message: M) -> Result<R, ActorError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§