pub trait ActorAddress<M> {
// Required methods
fn try_notify(&self, message: M) -> Result<(), M>;
async fn notify(&self, message: M);
}Expand description
A trait send message to another actor.
Individual actor implementations may augment the ActorAddress object
when appropriate bounds are met to provide method-like invocations.
Required Methods§
Sourcefn try_notify(&self, message: M) -> Result<(), M>
fn try_notify(&self, message: M) -> Result<(), M>
Attempt to send a message to the actor behind this address. If an error occurs when enqueueing the message on the destination actor, the message is returned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.