pub struct Mailbox<A: Actor> { /* private fields */ }Expand description
A typed reference to an actor in a cluster.
Implementations§
Source§impl<A: Actor> Mailbox<A>
impl<A: Actor> Mailbox<A>
Sourcepub fn send<M>(&self, message: M) -> Result<(), DeliverError<M>>
pub fn send<M>(&self, message: M) -> Result<(), DeliverError<M>>
Enqueues a message handled by this actor without waiting.
Sourcepub fn capacity(&self) -> NonZeroUsize
pub fn capacity(&self) -> NonZeroUsize
Returns the fixed mailbox capacity.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Mailbox<A>
impl<A> RefUnwindSafe for Mailbox<A>
impl<A> Send for Mailbox<A>
impl<A> Sync for Mailbox<A>
impl<A> Unpin for Mailbox<A>
impl<A> UnsafeUnpin for Mailbox<A>
impl<A> UnwindSafe for Mailbox<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more