Struct tcgeneric::time::NetworkTime[][src]

pub struct NetworkTime { /* fields omitted */ }

Implementations

impl NetworkTime[src]

A Tinychain timestamp, used for absolute ordering of transactions.

pub fn now() -> NetworkTime[src]

The current time.

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

This timestamp in nanoseconds since the Unix epoch.

pub fn from_nanos(nanos: u64) -> NetworkTime[src]

Constructs a new timestamp from a duration in nanoseconds since the Unix epoch.

Trait Implementations

impl Add<Duration> for NetworkTime[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for NetworkTime[src]

impl Eq for NetworkTime[src]

impl Ord for NetworkTime[src]

impl PartialEq<NetworkTime> for NetworkTime[src]

impl PartialOrd<NetworkTime> for NetworkTime[src]

impl StructuralEq for NetworkTime[src]

impl StructuralPartialEq for NetworkTime[src]

impl TryFrom<SystemTime> for NetworkTime[src]

type Error = TCError

The type returned in the event of a conversion error.

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<F, T> CastFrom<F> for T where
    T: From<F>, 
[src]

impl<T, F> CastInto<F> for T where
    F: CastFrom<T>, 
[src]

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

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

impl<F> Match for F[src]

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

type Owned = T

The resulting type after obtaining ownership.

impl<F, T> TryCastFrom<F> for T where
    T: CastFrom<F>, 
[src]

impl<F, T> TryCastInto<T> for F where
    T: TryCastFrom<F>, 
[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.