Struct swiss_army_knife::time::NanosecondsSinceUnixEpoch [−][src]
pub struct NanosecondsSinceUnixEpoch(_);
Expand description
Very similar to SystemTime
but without any concerns about time running backwards.
Internally modelled as a Duration
offset from the Unix Epoch.
Implementations
Minimum seconds.
Maximum seconds.
Effectively infinity.
From seconds (as an u64
).
From seconds (as an u32
).
pub const fn from_seconds_u32_before_next_wrap_around(
seconds: u32
) -> NanosecondsSinceUnixEpoch
pub const fn from_seconds_u32_before_next_wrap_around(
seconds: u32
) -> NanosecondsSinceUnixEpoch
From seconds (as an u32
), taking into account wrap-around due to the small size of an u32.
pub const fn from_seconds_u32_after_next_wrap_around(
seconds: u32
) -> NanosecondsSinceUnixEpoch
pub const fn from_seconds_u32_after_next_wrap_around(
seconds: u32
) -> NanosecondsSinceUnixEpoch
From seconds (as an u32
), taking into account wrap-around that has happened due to the small size of an u32.
Trait Implementations
Returns the “default value” for a type. Read more
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for NanosecondsSinceUnixEpoch
impl Send for NanosecondsSinceUnixEpoch
impl Sync for NanosecondsSinceUnixEpoch
impl Unpin for NanosecondsSinceUnixEpoch
impl UnwindSafe for NanosecondsSinceUnixEpoch
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,