#[non_exhaustive]#[repr(i32)]pub enum ClockId {
Realtime = 0,
Monotonic = 1,
ProcessCPUTime = 2,
ThreadCPUTime = 3,
RealtimeCoarse = 5,
MonotonicCoarse = 6,
MonotonicRaw = 4,
RealtimeAlarm = 8,
Boottime = 7,
BoottimeAlarm = 9,
}Available on crate feature
time and non-WASI only.Expand description
clockid_t
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 supported.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Realtime = 0
CLOCK_REALTIME
Monotonic = 1
CLOCK_MONOTONIC
ProcessCPUTime = 2
Available on neither
solarish nor target_os=horizon nor NetBSD nor Redox nor target_os=vita.CLOCK_PROCESS_CPUTIME_ID
ThreadCPUTime = 3
Available on neither
solarish nor target_os=horizon nor NetBSD nor Redox nor target_os=vita.CLOCK_THREAD_CPUTIME_ID
RealtimeCoarse = 5
Available on
linux_kernel or FreeBSD only.CLOCK_REALTIME_COARSE
MonotonicCoarse = 6
Available on
linux_kernel or FreeBSD only.CLOCK_MONOTONIC_COARSE
MonotonicRaw = 4
Available on
linux_kernel only.CLOCK_MONOTONIC_RAW
RealtimeAlarm = 8
Available on
linux_kernel only.CLOCK_REALTIME_ALARM
Boottime = 7
Available on
linux_kernel or Fuchsia or OpenBSD only.CLOCK_BOOTTIME
BoottimeAlarm = 9
Available on
linux_kernel or Fuchsia only.CLOCK_BOOTTIME_ALARM
Trait Implementations§
Source§impl Clone for ClockId
Available on neither Windows nor target_os=espidf and (crate features thread or time) only.
impl Clone for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.Source§impl Debug for ClockId
Available on neither Windows nor target_os=espidf and (crate features thread or time) only.
impl Debug for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.Source§impl Hash for ClockId
Available on neither Windows nor target_os=espidf and (crate features thread or time) only.
impl Hash for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.Source§impl PartialEq for ClockId
Available on neither Windows nor target_os=espidf and (crate features thread or time) only.
impl PartialEq for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.Source§impl TryFrom<i32> for ClockId
Available on neither Windows nor target_os=espidf and (crate features thread or time) and neither apple nor WASI only.
impl TryFrom<i32> for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) and neither apple nor WASI only.impl Copy for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.impl Eq for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.impl StructuralPartialEq for ClockId
Available on neither Windows nor
target_os=espidf and (crate features thread or time) only.Auto Trait Implementations§
impl Freeze for ClockId
impl RefUnwindSafe for ClockId
impl Send for ClockId
impl Sync for ClockId
impl Unpin for ClockId
impl UnwindSafe for ClockId
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