pub struct UnixTime(/* private fields */);
Expand description
A timestamp, tracking the number of non-leap seconds since the Unix epoch.
The Unix epoch is defined January 1, 1970 00:00:00 UTC.
Implementations§
Source§impl UnixTime
impl UnixTime
Sourcepub fn now() -> UnixTime
Available on crate feature std
and not (target_family="wasm"
and target_os="unknown"
), or target_family="wasm"
and target_os="unknown"
and crate feature web
only.
pub fn now() -> UnixTime
std
and not (target_family="wasm"
and target_os="unknown"
), or target_family="wasm"
and target_os="unknown"
and crate feature web
only.The current time, as a UnixTime
Sourcepub fn since_unix_epoch(duration: Duration) -> UnixTime
pub fn since_unix_epoch(duration: Duration) -> UnixTime
Convert a Duration
since the start of 1970 to a UnixTime
The duration
must be relative to the Unix epoch.
Trait Implementations§
Source§impl Ord for UnixTime
impl Ord for UnixTime
Source§impl PartialOrd for UnixTime
impl PartialOrd for UnixTime
impl Copy for UnixTime
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes