Struct routing::MessageId [] [src]

pub struct MessageId(_);

Unique ID for messages

This is used for deduplication: Since the network sends messages redundantly along different routes, the same message will usually arrive more than once at any given node. A message with an ID that is already in the cache will be ignored.

Methods

impl MessageId
[src]

Generate a new MessageId with random content.

Generate a MessageId with value 0. This should only be used for messages where there is no danger of duplication.

Generate a new MessageId with contents extracted from lost node.

Generate a new MessageId with contents extracted from new node.

Generate the reverse of the given MessageId.

Generate the increment (on the MSB only) of the given MessageId.

Generate the decrement (on the MSB only) of the given MessageId.

Trait Implementations

impl Ord for MessageId
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for MessageId
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for MessageId
[src]

Formats the value using the given formatter.

impl Clone for MessageId
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for MessageId
[src]

impl Eq for MessageId
[src]

impl PartialEq for MessageId
[src]

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

This method tests for !=.

impl Hash for MessageId
[src]

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

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

impl Default for MessageId
[src]

Returns the "default value" for a type. Read more