Struct ratman::TimePair[][src]

pub struct TimePair { /* fields omitted */ }

Represents the time of sending and receiving this frame

Because there is no guarantee that the host clock is accurate or being maliciously manipulated, the sending time should not be trusted. A timestamp that should be used by applications is available via the local() function.

Implementations

impl TimePair[src]

pub fn sending() -> Self[src]

A utility function to create a new sending timestamp

pub fn receive(&mut self)[src]

Update the received time in a timestamp locally received

pub fn local(&self) -> DateTime<Utc>[src]

Get the most likely local time

Trait Implementations

impl Clone for TimePair[src]

impl Debug for TimePair[src]

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

impl Eq for TimePair[src]

impl PartialEq<TimePair> for TimePair[src]

impl Serialize for TimePair[src]

impl StructuralEq for TimePair[src]

impl StructuralPartialEq for TimePair[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]