pub struct SystemTime {
pub(super) t: Timespec,
}
Fields§
§t: Timespec
Implementations§
source§impl SystemTime
impl SystemTime
pub fn now() -> SystemTime
source§impl SystemTime
impl SystemTime
pub fn new(tv_sec: i64, tv_nsec: i64) -> SystemTime
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 copy 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 Eq for SystemTime
impl Eq for SystemTime
fn assert_receiver_is_total_eq(&self)
source§impl From<timespec> for SystemTime
impl From<timespec> for SystemTime
source§fn from(t: timespec) -> SystemTime
fn from(t: timespec) -> SystemTime
Converts to this type from the input type.
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<SystemTime> for SystemTime
impl PartialEq<SystemTime> for SystemTime
source§fn eq(&self, other: &SystemTime) -> bool
fn eq(&self, other: &SystemTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SystemTime> for SystemTime
impl PartialOrd<SystemTime> for SystemTime
source§fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
fn partial_cmp(&self, other: &SystemTime) -> Option<Ordering>
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 SystemTime
impl StructuralEq for SystemTime
impl StructuralPartialEq for SystemTime
Auto Trait Implementations§
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