Struct routing::messaging::MpidMessage[][src]

pub struct MpidMessage { /* fields omitted */ }

A full message including header and body which can be sent to or retrieved from the network.

Methods

impl MpidMessage
[src]

Constructor.

sender and metadata are used to construct an MpidHeader member, accessed via the header() getter. For details on these arguments, see MpidHeader::new().

recipient represents the name of the intended receiver of the message.

body is arbitrary, user-supplied data representing the main portion of the message. It must not exceed MAX_BODY_SIZE. It can be empty if desired.

An error will be returned if body exceeds MAX_BODY_SIZE, if MpidHeader::new() fails or if serialisation during the signing process fails.

Getter for MpidHeader member, created when calling new().

The name of the intended receiver of the message.

Arbitrary, user-supplied data representing the main portion of the message.

The name of the message, equivalent to the MpidHeader::name(). As per that getter, this is relatively expensive, so its use should be minimised.

Validates the message and header signatures against the provided PublicKey.

Trait Implementations

impl PartialEq for MpidMessage
[src]

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

This method tests for !=.

impl Eq for MpidMessage
[src]

impl Hash for MpidMessage
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for MpidMessage
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for MpidMessage
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for MpidMessage

impl Sync for MpidMessage