pub enum Mail {
Trade(Msg),
Bulk(Vec<Msg>),
Blank,
}Expand description
The Mail enum which could be Trade(single message), Bulk(multiple messages) or Blank
Variants§
Trade(Msg)
A mail variant with a single message inside. Actor’s receives this variant
Bulk(Vec<Msg>)
Contains multiple messages - used for buffering, single shot transmission over the wire
Blank
An empty mail
Implementations§
Source§impl Mail
impl Mail
Sourcepub fn messages(&self) -> &Vec<Msg>
pub fn messages(&self) -> &Vec<Msg>
Get a handle to inner messages without hollowing out the mail
Sourcepub fn command_equals(&self, action: Action) -> bool
pub fn command_equals(&self, action: Action) -> bool
If the mail is actually a command - does it match a specific command
Sourcepub fn is_command(&self) -> bool
pub fn is_command(&self) -> bool
Is the mail is actually a containing a single command like Shutdown etc?
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mail
impl<'de> Deserialize<'de> for Mail
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
impl StructuralPartialEq for Mail
Auto Trait Implementations§
impl Freeze for Mail
impl RefUnwindSafe for Mail
impl Send for Mail
impl Sync for Mail
impl Unpin for Mail
impl UnwindSafe for Mail
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