pub struct SystemTimeError(/* private fields */);
Expand description
An error returned from the duration_since
and elapsed
methods on
SystemTime
, used to learn how far in the opposite direction a system time
lies.
§Examples
Implementations§
Source§impl SystemTimeError
impl SystemTimeError
1.8.0 · Sourcepub fn duration(&self) -> Duration
pub fn duration(&self) -> Duration
Returns the positive duration which represents how far forward the second system time was from the first.
A SystemTimeError
is returned from the SystemTime::duration_since
and SystemTime::elapsed
methods whenever the second system time
represents a point later in time than the self
of the method call.
§Examples
Trait Implementations§
1.8.0 · Source§impl Clone for SystemTimeError
impl Clone for SystemTimeError
Source§fn clone(&self) -> SystemTimeError
fn clone(&self) -> SystemTimeError
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 more1.8.0 · Source§impl Debug for SystemTimeError
impl Debug for SystemTimeError
1.8.0 · Source§impl Display for SystemTimeError
impl Display for SystemTimeError
1.8.0 · Source§impl Error for SystemTimeError
impl Error for SystemTimeError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
Auto Trait Implementations§
impl Freeze for SystemTimeError
impl RefUnwindSafe for SystemTimeError
impl Send for SystemTimeError
impl Sync for SystemTimeError
impl Unpin for SystemTimeError
impl UnwindSafe for SystemTimeError
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