pub struct MsgMailbox<M: Message> { /* private fields */ }
Expand description
A MsgMailbox
only depends on the type of the messages it can contain.
This allows a real separation between the caller and the recipient, they do not need to know about each other.
Implementations§
Source§impl<M: Message> MsgMailbox<M>
impl<M: Message> MsgMailbox<M>
pub fn send_and_forget(&self, message: M) -> Result<(), MailboxError>
pub fn send_and_wait_for_reply( &self, message: M, ) -> Result<M::Reply, MailboxError>
Trait Implementations§
Source§impl<M: Message> Clone for MsgMailbox<M>
impl<M: Message> Clone for MsgMailbox<M>
Source§impl<M, S> From<BoundedMailbox<S>> for MsgMailbox<M>
impl<M, S> From<BoundedMailbox<S>> for MsgMailbox<M>
Source§fn from(mailbox: BoundedMailbox<S>) -> Self
fn from(mailbox: BoundedMailbox<S>) -> Self
Converts to this type from the input type.
Source§impl<M, S> From<BoundedTaskMailbox<S>> for MsgMailbox<M>
impl<M, S> From<BoundedTaskMailbox<S>> for MsgMailbox<M>
Source§fn from(mailbox: BoundedTaskMailbox<S>) -> Self
fn from(mailbox: BoundedTaskMailbox<S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<M> Freeze for MsgMailbox<M>
impl<M> !RefUnwindSafe for MsgMailbox<M>
impl<M> Send for MsgMailbox<M>
impl<M> Sync for MsgMailbox<M>
impl<M> Unpin for MsgMailbox<M>
impl<M> !UnwindSafe for MsgMailbox<M>
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