Struct routing::messaging::MpidHeader [] [src]

pub struct MpidHeader { /* fields omitted */ }

Minimal information about a given message which can be used as a notification to the receiver.

Methods

impl MpidHeader
[src]

[src]

Constructor.

Each new MpidHeader will have a random unique identifier assigned to it, accessed via the guid() getter.

sender represents the name of the original creator of the message.

metadata is arbitrary, user-supplied information which must not exceed MAX_HEADER_METADATA_SIZE. It can be empty if desired.

secret_key will be used to generate a signature of sender, guid and metadata.

An error will be returned if metadata exceeds MAX_HEADER_METADATA_SIZE or if serialisation during the signing process fails.

[src]

The name of the original creator of the message.

[src]

A unique identifier generated randomly when calling new().

[src]

Arbitrary, user-supplied information.

[src]

The signature of sender, guid and metadata, created when calling new().

[src]

The name of the header. This is a relatively expensive getter - the name is the SHA512 hash of the serialised header, so its use should be minimised.

[src]

Validates the header's signature against the provided PublicKey.

Trait Implementations

impl PartialEq for MpidHeader
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for MpidHeader
[src]

impl Hash for MpidHeader
[src]

[src]

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

1.3.0
[src]

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

impl Clone for MpidHeader
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for MpidHeader
[src]

[src]

Formats the value using the given formatter.