[][src]Struct plumcast::message::MessageId

pub struct MessageId { /* fields omitted */ }

Message identifier.

An identifier consists of the node identifier part and the sequence number part. The node identifier part which type is NodeId indicates the sender (origin) of the message. The sequence number part indicates the number of messages broadcasted by the sender so far.

Identifiers are assigned automatically when broadcasting messages.

It is guaranteed that the identifiers are unique in a cluster unless the OS processes executing plumcast nodes are restarted. Practically confliction of identifiers is extremely rare even if OS processes are frequently restarted.

Methods

impl MessageId[src]

pub fn node(&self) -> NodeId[src]

Returns the node identifier part of the message identifier.

pub fn seqno(&self) -> u64[src]

Returns the sequence number part of the message identifier.

Trait Implementations

impl Clone for MessageId[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for MessageId[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Eq for MessageId[src]

impl Copy for MessageId[src]

impl PartialOrd<MessageId> for MessageId[src]

impl PartialEq<MessageId> for MessageId[src]

impl Debug for MessageId[src]

impl Hash for MessageId[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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

Auto Trait Implementations

impl Send for MessageId

impl Sync for MessageId

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]