Struct rustls_pki_types::UnixTime 
source · 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() -> Self
 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() -> Self
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) -> Self
 
pub fn since_unix_epoch(duration: Duration) -> Self
Convert a Duration since the start of 1970 to a UnixTime
The duration must be relative to the Unix epoch.
Trait Implementations§
source§impl PartialEq for UnixTime
 
impl PartialEq for UnixTime
source§impl PartialOrd for UnixTime
 
impl PartialOrd for UnixTime
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 moreimpl 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