Message

Trait Message 

Source
pub trait Message: Send + 'static {
    type Result: Send;
}
Expand description

A message that can be sent to an Actor for processing. They are processed one at a time. Only actors implementing the corresponding Handler<M> trait can be sent a given message.

§Example

struct MyResult;
struct MyMessage;

impl Message for MyMessage {
    type Result = MyResult;
}

Required Associated Types§

Source

type Result: Send

The return type of the message. It will be returned when the Address::send method is called.

Implementors§