#[non_exhaustive]pub struct MtimeStamp {
pub secs: i64,
pub nanos: u32,
}Expand description
Seconds + nanoseconds since UNIX epoch. Negative secs for pre-epoch times.
Uses floor semantics: nanos is always non-negative and secs is the
largest integer ≤ the true value. For example, 0.5 seconds before epoch
is { secs: -1, nanos: 500_000_000 }, representing −1 + 0.5 = −0.5.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.secs: i64§nanos: u32Implementations§
Source§impl MtimeStamp
impl MtimeStamp
Sourcepub fn to_system_time(self) -> SystemTime
pub fn to_system_time(self) -> SystemTime
Convert back to SystemTime. Lossless roundtrip with From<SystemTime>.
Trait Implementations§
Source§impl Clone for MtimeStamp
impl Clone for MtimeStamp
Source§fn clone(&self) -> MtimeStamp
fn clone(&self) -> MtimeStamp
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MtimeStamp
impl Debug for MtimeStamp
Source§impl From<SystemTime> for MtimeStamp
impl From<SystemTime> for MtimeStamp
Source§fn from(t: SystemTime) -> Self
fn from(t: SystemTime) -> Self
Converts to this type from the input type.
Source§impl Hash for MtimeStamp
impl Hash for MtimeStamp
Source§impl PartialEq for MtimeStamp
impl PartialEq for MtimeStamp
impl Copy for MtimeStamp
impl Eq for MtimeStamp
impl StructuralPartialEq for MtimeStamp
Auto Trait Implementations§
impl Freeze for MtimeStamp
impl RefUnwindSafe for MtimeStamp
impl Send for MtimeStamp
impl Sync for MtimeStamp
impl Unpin for MtimeStamp
impl UnsafeUnpin for MtimeStamp
impl UnwindSafe for MtimeStamp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.