Enum rustix::time::ClockId

#[repr(u32)]
#[non_exhaustive]
pub enum ClockId {    
    Realtime,
    Monotonic,
    ProcessCPUTime,
    ThreadCPUTime,
    RealtimeCoarse,
    MonotonicCoarse,
    MonotonicRaw,
}
Documentation

CLOCK_* constants for use with clock_gettime.

These constants are always supported at runtime so clock_gettime never has to fail with INVAL due to an unsupported clock. See DynamicClockId for a greater set of clocks, with the caveat that not all of them are always support

Variants

Realtime

CLOCK_REALTIME

Monotonic

CLOCK_MONOTONIC

ProcessCPUTime

CLOCK_PROCESS_CPUTIME_ID

ThreadCPUTime

CLOCK_THREAD_CPUTIME_ID

RealtimeCoarse

CLOCK_REALTIME_COARSE

MonotonicCoarse

CLOCK_MONOTONIC_COARSE

MonotonicRaw

CLOCK_MONOTONIC_RAW

Trait Implementations

impl Clone for ClockId
fn clone(&Self) -> ClockId
impl Copy for ClockId
impl Debug for ClockId
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Eq for ClockId
impl Hash for ClockId
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl PartialEq<ClockId> for ClockId
fn eq(&Self, other: &ClockId) -> bool
impl StructuralEq for ClockId

Auto Trait Implementations

impl Send for ClockId
impl Sync for ClockId
impl Unpin for ClockId
impl UnwindSafe for ClockId

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>