pub struct UnixTime(/* private fields */);Expand description
Caller-observed Unix time in whole seconds.
Implementations§
Source§impl UnixTime
impl UnixTime
Sourcepub const fn from_seconds(seconds: u64) -> Self
pub const fn from_seconds(seconds: u64) -> Self
Wraps a caller-observed timestamp. Core acquires no clock.
Sourcepub const fn as_seconds(self) -> u64
pub const fn as_seconds(self) -> u64
Returns whole seconds since the Unix epoch.
Trait Implementations§
impl Copy for UnixTime
impl Eq for UnixTime
Source§impl Ord for UnixTime
impl Ord for UnixTime
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for UnixTime
impl PartialOrd for UnixTime
impl StructuralPartialEq for UnixTime
Auto Trait Implementations§
impl Freeze for UnixTime
impl RefUnwindSafe for UnixTime
impl Send for UnixTime
impl Sync for UnixTime
impl Unpin for UnixTime
impl UnsafeUnpin for UnixTime
impl UnwindSafe for UnixTime
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