pub struct Msg { /* private fields */ }Expand description
The actual payload received by actors inside a Mail enum construct
Implementations
Construct a new message with binary content with from and to addresses
Update the message with binary content
Create a msg with content as text to an actor(actor1) in the local system
Example
use arrows::send;
use arrows::Msg;
let m = Msg::with_text("A good will message");
send!("actor1", m);
Construct a text message with from and to addresses
Get the content of msg as text. In case - binary content being actually binary this would not be helpful.
Is the message actually a command?
Command action equality check
The message as bytes - irrespective of whether content is text or actual binary blob. Empty byte vec - if can not be serialized
Construct a text reply with content as string and message direction reversed
Update the content of the message - text
Set new binary content and new local recipient actor address
Set the binary content of the message
Set the recipient address of the message
Set the recipient identifier as string literal
Set the recipient actor’s IP - used in remoting
Set the recipient port
Get the port of the recipient actor - used for remote messaging
Reverse the message direction - ‘to’ to ‘from’ or other way
Get the binary content - the message remains intact
If the message content is binary blob - get it Would take content out - leaving message content to a None
Get the id as string. Required because unique ids overflow i64 range supported by the backing store
Set the from address of a message - specific usage while sending out actor message processing outcome
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Msg
impl UnwindSafe for Msg
Blanket Implementations
Mutably borrows from an owned value. Read more