[][src]Struct sched_clock::Instant

pub struct 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_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for Instant[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (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]

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.

impl Sub<Duration> for Instant[src]

type Output = Instant

The resulting type after applying the - operator.

impl Sub<Instant> for Instant[src]

type Output = Duration

The resulting type after applying the - operator.

impl AddAssign<Duration> for Instant[src]

impl SubAssign<Duration> for Instant[src]

impl Hash for Instant[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Instant

impl Sync for Instant

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]