pub trait Receiver<M: Message>: Send + Sync {
// Required methods
fn send(&self, msg: M) -> Result<(), ActorError>;
fn request_raw(&self, msg: M) -> Result<Receiver<M::Result>, ActorError>;
}Expand description
Object-safe trait for sending a single message type to an actor.
Implemented automatically by ActorRef<A> and Context<A> for any
message type that A handles.
Required Methods§
fn send(&self, msg: M) -> Result<(), ActorError>
fn request_raw(&self, msg: M) -> Result<Receiver<M::Result>, ActorError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".