pub struct Mailbox<T> { /* private fields */ }
Expand description
Represents a destination for responses
Implementations§
Source§impl<T> Mailbox<T>
impl<T> Mailbox<T>
Sourcepub fn try_next(&mut self) -> Result<T, MailboxTryNextError>
pub fn try_next(&mut self) -> Result<T, MailboxTryNextError>
Tries to receive the next value in mailbox without blocking or waiting async
Sourcepub async fn next_timeout(&mut self, duration: Duration) -> Result<Option<T>>
pub async fn next_timeout(&mut self, duration: Duration) -> Result<Option<T>>
Receives next value in mailbox, waiting up to duration before timing out
Auto Trait Implementations§
impl<T> Freeze for Mailbox<T>
impl<T> !RefUnwindSafe for Mailbox<T>
impl<T> Send for Mailbox<T>
impl<T> Sync for Mailbox<T>
impl<T> Unpin for Mailbox<T>
impl<T> !UnwindSafe for Mailbox<T>
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