pub struct SystemTimeTime;Expand description
Time implementation for std::time::SystemTime.
instant_sub panics if a < b because Duration cannot
represent negative values. Use Time::instant_cmp to compare instants.
Trait Implementations§
Source§impl Time for SystemTimeTime
impl Time for SystemTimeTime
type Instant = SystemTime
type Duration = Duration
Source§fn instant_sub(a: SystemTime, b: SystemTime) -> Duration
fn instant_sub(a: SystemTime, b: SystemTime) -> Duration
Returns
a - b. Behavior when a < b is unspecified: implementations may
panic or return a meaningless value. Use instant_cmp to
check ordering first if unsure.Source§fn duration_sub(a: Duration, b: Duration) -> Duration
fn duration_sub(a: Duration, b: Duration) -> Duration
Returns
a - b. Behavior when a < b is unspecified: implementations may
panic or return a meaningless value.fn duration_add(a: Duration, b: Duration) -> Duration
fn mixed_sub(a: SystemTime, b: Duration) -> SystemTime
fn mixed_add(a: SystemTime, b: Duration) -> SystemTime
fn instant_cmp(a: Self::Instant, b: Self::Instant) -> Ordering
Auto Trait Implementations§
impl Freeze for SystemTimeTime
impl RefUnwindSafe for SystemTimeTime
impl Send for SystemTimeTime
impl Sync for SystemTimeTime
impl Unpin for SystemTimeTime
impl UnsafeUnpin for SystemTimeTime
impl UnwindSafe for SystemTimeTime
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