[][src]Struct rust_ipv8::payloads::timedistributionpayload::TimeDistributionPayload

pub struct TimeDistributionPayload {
    pub global_time: u64,
}

The global time in the system. Uses a lamport clock system. Ipv8 stores global time values using, at most, 64 bits. Therefore there is a finite number of global time values available. To avoid malicious peers from quickly pushing the global time value to the point where none are left, peers will only accept messages with a global time that is within a locally evaluated limit. This limit is set to the median of the neighbors’ global time values plus a predefined margin. https://en.wikipedia.org/wiki/Lamport_timestamps (from dispersy docs. TODO: still up to date?)

Fields

global_time: u64

The actual time represented as a u64

Trait Implementations

impl Ipv8Payload for TimeDistributionPayload[src]

impl PartialEq<TimeDistributionPayload> for TimeDistributionPayload[src]

impl Debug for TimeDistributionPayload[src]

impl Serialize for TimeDistributionPayload[src]

impl<'de> Deserialize<'de> for TimeDistributionPayload[src]

Auto Trait Implementations

impl Unpin for TimeDistributionPayload

impl Sync for TimeDistributionPayload

impl Send for TimeDistributionPayload

impl RefUnwindSafe for TimeDistributionPayload

impl UnwindSafe for TimeDistributionPayload

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]