pub struct SystemTime { /* private fields */ }Implementations§
Source§impl SystemTime
impl SystemTime
pub fn now() -> Self
pub fn from_u64(val: u64) -> Self
pub fn as_u64(&self) -> u64
pub fn as_unix_ts(&self) -> u64
pub fn from_unix_ts(val: u64) -> Self
pub fn sub_time(&self, other: &SystemTime) -> Result<Duration, Duration>
pub fn checked_add_duration(&self, other: &Duration) -> Option<SystemTime>
pub fn checked_sub_duration(&self, other: &Duration) -> Option<SystemTime>
Trait Implementations§
Source§impl Clone for SystemTime
impl Clone for SystemTime
Source§fn clone(&self) -> SystemTime
fn clone(&self) -> SystemTime
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 SystemTime
impl Debug for SystemTime
Source§impl Hash for SystemTime
impl Hash for SystemTime
Source§impl Ord for SystemTime
impl Ord for SystemTime
Source§fn cmp(&self, other: &SystemTime) -> Ordering
fn cmp(&self, other: &SystemTime) -> Ordering
1.21.0 · 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 PartialEq for SystemTime
impl PartialEq for SystemTime
Source§impl PartialOrd for SystemTime
impl PartialOrd for SystemTime
impl Copy for SystemTime
impl Eq for SystemTime
impl StructuralPartialEq for SystemTime
Auto Trait Implementations§
impl Freeze for SystemTime
impl RefUnwindSafe for SystemTime
impl Send for SystemTime
impl Sync for SystemTime
impl Unpin for SystemTime
impl UnwindSafe for SystemTime
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