pub struct SystemTime(/* private fields */);Expand description
Implementations§
Source§impl SystemTime
impl SystemTime
Sourcepub const UNIX_EPOCH: Self
Available on target_family=wasm and target_os=unknown only.
pub const UNIX_EPOCH: Self
target_family=wasm and target_os=unknown only.Sourcepub fn duration_since(&self, earlier: Self) -> Result<Duration, SystemTimeError>
Available on target_family=wasm and target_os=unknown only.
pub fn duration_since(&self, earlier: Self) -> Result<Duration, SystemTimeError>
target_family=wasm and target_os=unknown only.Sourcepub fn elapsed(&self) -> Result<Duration, SystemTimeError>
Available on target_family=wasm and target_os=unknown only.
pub fn elapsed(&self) -> Result<Duration, SystemTimeError>
target_family=wasm and target_os=unknown only.Sourcepub fn checked_add(&self, duration: Duration) -> Option<Self>
Available on target_family=wasm and target_os=unknown only.
pub fn checked_add(&self, duration: Duration) -> Option<Self>
target_family=wasm and target_os=unknown only.Sourcepub fn checked_sub(&self, duration: Duration) -> Option<Self>
Available on target_family=wasm and target_os=unknown only.
pub fn checked_sub(&self, duration: Duration) -> Option<Self>
target_family=wasm and target_os=unknown only.Trait Implementations§
Source§impl Add<Duration> for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl Add<Duration> for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§fn add(self, dur: Duration) -> Self
fn add(self, dur: 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
Available on target_family=wasm and target_os=unknown only.
impl AddAssign<Duration> for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§fn add_assign(&mut self, other: Duration)
fn add_assign(&mut self, other: Duration)
Performs the
+= operation. Read moreSource§impl Clone for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl Clone for SystemTime
Available on
target_family=wasm and target_os=unknown only.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
Available on target_family=wasm and target_os=unknown only.
impl Debug for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§impl<'de> Deserialize<'de> for SystemTime
Available on target_family=wasm and target_os=unknown and crate feature serde only.
impl<'de> Deserialize<'de> for SystemTime
Available on
target_family=wasm and target_os=unknown and 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
Available on target_family=wasm and target_os=unknown only.
impl Hash for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§impl Ord for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl Ord for SystemTime
Available on
target_family=wasm and target_os=unknown only.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
Available on target_family=wasm and target_os=unknown only.
impl PartialEq for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§impl PartialOrd for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl PartialOrd for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§impl Serialize for SystemTime
Available on target_family=wasm and target_os=unknown and crate feature serde only.
impl Serialize for SystemTime
Available on
target_family=wasm and target_os=unknown and crate feature serde only.Source§impl Sub<Duration> for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl Sub<Duration> for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§impl SubAssign<Duration> for SystemTime
Available on target_family=wasm and target_os=unknown only.
impl SubAssign<Duration> for SystemTime
Available on
target_family=wasm and target_os=unknown only.Source§fn sub_assign(&mut self, other: Duration)
fn sub_assign(&mut self, other: Duration)
Performs the
-= operation. Read moreSource§impl SystemTimeExt for SystemTime
Available on Web only.
impl SystemTimeExt for SystemTime
Available on
Web 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
Available on
target_family=wasm and target_os=unknown only.impl Eq for SystemTime
Available on
target_family=wasm and target_os=unknown only.impl StructuralPartialEq for SystemTime
Available on
target_family=wasm and target_os=unknown only.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