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

Get a handle to the inner message

Get a handle to inner messages without hollowing out the mail

Take the inner message out - if its a Trade variant

Take all the content out if its Mail enum variant is Bulk

If the mail is actually a command - does it match a specific command

Is the mail is actually a containing a single command like Shutdown etc?

Get the embedded Action out if this mail is a command

Is the mail empty - mostly to avoid transmitting

Set from address on all the messagess inside a potential mail

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.