Struct tcgeneric::time::NetworkTime [−][src]
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.
fn add(self, other: Duration) -> Self
[src]
impl Clone for NetworkTime
[src]
fn clone(&self) -> NetworkTime
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for NetworkTime
[src]
impl Ord for NetworkTime
[src]
fn cmp(&self, other: &NetworkTime) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<NetworkTime> for NetworkTime
[src]
fn eq(&self, other: &NetworkTime) -> bool
[src]
fn ne(&self, other: &NetworkTime) -> bool
[src]
impl PartialOrd<NetworkTime> for NetworkTime
[src]
fn partial_cmp(&self, other: &NetworkTime) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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.
fn try_from(st: SystemTime) -> TCResult<NetworkTime>
[src]
Auto Trait Implementations
impl RefUnwindSafe for NetworkTime
impl Send for NetworkTime
impl Sync for NetworkTime
impl Unpin for NetworkTime
impl UnwindSafe for NetworkTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<F, T> CastFrom<F> for T where
T: From<F>,
[src]
T: From<F>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
[src]
F: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> Match for F
[src]
pub fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
T: TryCastFrom<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
T: CastFrom<F>,
pub fn can_cast_from(&F) -> bool
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
T: TryCastFrom<F>,
pub fn can_cast_into(&self) -> bool
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
OnErr: FnOnce(&Self) -> Err,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,