pub struct BroadcastMsgMailbox<M: Message + Clone> { /* private fields */ }Expand description
A MsgMailbox that will send to all services that have registered with it
This mailbox allows you to do a one-to-many mapping of mailboxes to services. It’s used in the case where we need to notiy several services of the same message simultaneously.
Implementations§
Source§impl<M: Message + Clone> BroadcastMsgMailbox<M>
impl<M: Message + Clone> BroadcastMsgMailbox<M>
pub fn send_and_forget(&self, message: M) -> Result<(), MailboxError>
pub fn send_and_wait_for_reply( &self, message: M, ) -> Result<Vec<M::Reply>, MailboxError>
Trait Implementations§
Source§impl<M: Clone + Message + Clone> Clone for BroadcastMsgMailbox<M>
impl<M: Clone + Message + Clone> Clone for BroadcastMsgMailbox<M>
Source§fn clone(&self) -> BroadcastMsgMailbox<M>
fn clone(&self) -> BroadcastMsgMailbox<M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<M: Message + Clone> From<Vec<MsgMailbox<M>>> for BroadcastMsgMailbox<M>
impl<M: Message + Clone> From<Vec<MsgMailbox<M>>> for BroadcastMsgMailbox<M>
Source§fn from(msg_mailboxes: Vec<MsgMailbox<M>>) -> Self
fn from(msg_mailboxes: Vec<MsgMailbox<M>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<M> Freeze for BroadcastMsgMailbox<M>
impl<M> !RefUnwindSafe for BroadcastMsgMailbox<M>
impl<M> Send for BroadcastMsgMailbox<M>
impl<M> Sync for BroadcastMsgMailbox<M>
impl<M> Unpin for BroadcastMsgMailbox<M>
impl<M> UnsafeUnpin for BroadcastMsgMailbox<M>
impl<M> !UnwindSafe for BroadcastMsgMailbox<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