pub struct Timestamp(_);
Expand description
Timestamp in nanos since Unix epoch.
Availability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Implementations§
source§impl Timestamp
impl Timestamp
sourcepub fn now() -> Self
pub fn now() -> Self
Availability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
pub fn from_nanos(ns: u64) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<SystemTime> for Timestamp
impl From<SystemTime> for Timestamp
source§fn from(sys_time: SystemTime) -> Self
fn from(sys_time: SystemTime) -> Self
Converts to this type from the input type.
source§impl Ord for Timestamp
impl Ord for Timestamp
source§impl PartialEq<Timestamp> for Timestamp
impl PartialEq<Timestamp> for Timestamp
source§impl PartialOrd<Timestamp> for Timestamp
impl PartialOrd<Timestamp> for Timestamp
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more