Struct lunatic_message_request::TaggedMailbox
source · pub struct TaggedMailbox<M, S = Bincode, L = ()>where
S: Serializer<M>,{ /* private fields */ }Expand description
A lunatic mailbox with a tag.
This is useful for receiving messages with the given tag,
even if the current process does not take M message type.
Implementations§
source§impl<M, S, L> TaggedMailbox<M, S, L>where
S: Serializer<M>,
impl<M, S, L> TaggedMailbox<M, S, L>where S: Serializer<M>,
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new tag and mailbox, returning a TaggedMailbox.
sourcepub fn from_tag(tag: Tag) -> Self
pub fn from_tag(tag: Tag) -> Self
Creates a TaggedMailbox from an existing Tag.
sourcepub fn receive_timeout(&self, timeout: Duration) -> MailboxResult<M>
pub fn receive_timeout(&self, timeout: Duration) -> MailboxResult<M>
Receives a message with a timeout.
source§impl<M, S> TaggedMailbox<M, S, ()>where
S: Serializer<M>,
impl<M, S> TaggedMailbox<M, S, ()>where S: Serializer<M>,
Trait Implementations§
source§impl<M: Clone, S, L: Clone> Clone for TaggedMailbox<M, S, L>where
S: Serializer<M> + Clone,
impl<M: Clone, S, L: Clone> Clone for TaggedMailbox<M, S, L>where S: Serializer<M> + Clone,
source§fn clone(&self) -> TaggedMailbox<M, S, L>
fn clone(&self) -> TaggedMailbox<M, S, L>
Returns a copy 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: Debug, S, L: Debug> Debug for TaggedMailbox<M, S, L>where
S: Serializer<M> + Debug,
impl<M: Debug, S, L: Debug> Debug for TaggedMailbox<M, S, L>where S: Serializer<M> + Debug,
source§impl<M, S, L> Default for TaggedMailbox<M, S, L>where
S: Serializer<M>,
impl<M, S, L> Default for TaggedMailbox<M, S, L>where S: Serializer<M>,
source§impl<'de, M, S, L> Deserialize<'de> for TaggedMailbox<M, S, L>where
S: Serializer<M>,
impl<'de, M, S, L> Deserialize<'de> for TaggedMailbox<M, S, L>where S: Serializer<M>,
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more