pub struct Mailbox<A> { /* private fields */ }
Expand description
Implementations§
source§impl<A> Mailbox<A>
impl<A> Mailbox<A>
sourcepub fn bounded(capacity: usize) -> (Address<A>, Mailbox<A>)
pub fn bounded(capacity: usize) -> (Address<A>, Mailbox<A>)
Creates a new Mailbox
with the given capacity.
sourcepub fn unbounded() -> (Address<A>, Mailbox<A>)
pub fn unbounded() -> (Address<A>, Mailbox<A>)
Creates a new, unbounded Mailbox
.
Unbounded mailboxes will not perform an back-pressure and can result in potentially unbounded memory growth. Use with care.
sourcepub fn address(&self) -> WeakAddress<A>
pub fn address(&self) -> WeakAddress<A>
Obtain a WeakAddress
to this Mailbox
.
Obtaining a WeakAddress
is always successful even if there are no more strong addresses
around. Use WeakAddress::try_upgrade
to get a strong address.
Trait Implementations§
Auto Trait Implementations§
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> !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