Trait IsTimestamp

Source
pub trait IsTimestamp {
    // Required methods
    fn from_time_val(time_val: TimeVal) -> Self;
    fn from_time_spec(time_spec: TimeSpec) -> Self;
    fn into_time_val(self) -> TimeVal;
    fn into_time_spec(self) -> TimeSpec;
}
Expand description

Something which can be used as timestamp

Required Methods§

Source

fn from_time_val(time_val: TimeVal) -> Self

Convert from time val

Source

fn from_time_spec(time_spec: TimeSpec) -> Self

Convert from time spec

Source

fn into_time_val(self) -> TimeVal

Convert into time val

Source

fn into_time_spec(self) -> TimeSpec

Convert into time spec

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IsTimestamp for Duration

Source§

impl IsTimestamp for SystemTime

Source§

impl IsTimestamp for TimeVal

Implementors§