[−][src]Struct sched_clock::Instant
Points in time
Instants (aka timestamps) are encoded as a number of nanoseconds since/before some epoch, and can be measured using a Clock.
There are many possible choices of epoch, including process startup time, system startup time, and UTC references. The choice of epoch is specific to a given Clock implementation, and may be spelled out in that Clock's documentation when the implementor knows about it.
Methods
impl Instant
[src]
pub const EPOCH: Self
[src]
Instants are defined relatively to an epoch
pub const FOREVER_AGO: Self
[src]
"Minus infinity" instant, as far away in the past as representable
pub const SOMEDAY: Self
[src]
"Plus infinity" instant, as far away in the future as representable
Trait Implementations
impl Clone for Instant
[src]
fn clone(&self) -> Instant
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Instant
[src]
fn cmp(&self, other: &Instant) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl Eq for Instant
[src]
impl Copy for Instant
[src]
impl PartialOrd<Instant> for Instant
[src]
fn partial_cmp(&self, other: &Instant) -> Option<Ordering>
[src]
fn lt(&self, other: &Instant) -> bool
[src]
fn le(&self, other: &Instant) -> bool
[src]
fn gt(&self, other: &Instant) -> bool
[src]
fn ge(&self, other: &Instant) -> bool
[src]
impl PartialEq<Instant> for Instant
[src]
impl Debug for Instant
[src]
impl Add<Duration> for Instant
[src]
type Output = Instant
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Instant
[src]
impl Sub<Duration> for Instant
[src]
type Output = Instant
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Instant
[src]
impl Sub<Instant> for Instant
[src]
type Output = Duration
The resulting type after applying the -
operator.
fn sub(self, rhs: Instant) -> Duration
[src]
impl AddAssign<Duration> for Instant
[src]
fn add_assign(&mut self, other: Duration)
[src]
impl SubAssign<Duration> for Instant
[src]
fn sub_assign(&mut self, other: Duration)
[src]
impl Hash for Instant
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,