pub struct SystemTime(/* private fields */);
Expand description
Implementations§
Source§impl SystemTime
impl SystemTime
Sourcepub const UNIX_EPOCH: Self = _
pub const UNIX_EPOCH: Self = _
Sourcepub fn duration_since(&self, earlier: Self) -> Result<Duration, SystemTimeError>
pub fn duration_since(&self, earlier: Self) -> Result<Duration, SystemTimeError>
Sourcepub fn elapsed(&self) -> Result<Duration, SystemTimeError>
pub fn elapsed(&self) -> Result<Duration, SystemTimeError>
Sourcepub fn checked_add(&self, duration: Duration) -> Option<Self>
pub fn checked_add(&self, duration: Duration) -> Option<Self>
Sourcepub fn checked_sub(&self, duration: Duration) -> Option<Self>
pub fn checked_sub(&self, duration: Duration) -> Option<Self>
Trait Implementations§
Source§impl Add<Duration> for SystemTime
impl Add<Duration> for SystemTime
Source§fn add(self, rhs: Duration) -> Self
fn add(self, rhs: Duration) -> Self
§Panics
This function may panic if the resulting point in time cannot be
represented by the underlying data structure. See
SystemTime::checked_add
for a version without panic.
Source§type Output = SystemTime
type Output = SystemTime
The resulting type after applying the
+
operator.Source§impl AddAssign<Duration> for SystemTime
impl AddAssign<Duration> for SystemTime
Source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
Performs the
+=
operation. Read moreSource§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<'de> Deserialize<'de> for SystemTime
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for SystemTime
Available on crate feature
serde
only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Source§impl Serialize for SystemTime
Available on crate feature serde
only.
impl Serialize for SystemTime
Available on crate feature
serde
only.Source§impl Sub<Duration> for SystemTime
impl Sub<Duration> for SystemTime
Source§impl SubAssign<Duration> for SystemTime
impl SubAssign<Duration> for SystemTime
Source§fn sub_assign(&mut self, rhs: Duration)
fn sub_assign(&mut self, rhs: Duration)
Performs the
-=
operation. Read moreSource§impl SystemTimeExt for SystemTime
Available on Web
and crate feature std
only.
impl SystemTimeExt for SystemTime
Available on
Web
and crate feature std
only.Source§fn to_std(self) -> SystemTime
fn to_std(self) -> SystemTime
Source§fn from_std(time: SystemTime) -> SystemTime
fn from_std(time: SystemTime) -> 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