Struct nix::time::ClockId
pub struct ClockId(_);Documentation
Clock identifier
Newtype pattern around clockid_t (which is just alias). It pervents bugs caused by
accidentally passing wrong value.
Implementations
impl ClockId
pub const fn from_raw(clk_id: clockid_t) -> Self
Creates ClockId from raw clockid_t
pub fn pid_cpu_clock_id(pid: Pid) -> Result<Self>
Returns ClockId of a pid CPU-time clock
pub const fn as_raw(Self) -> clockid_t
Gets the raw clockid_t wrapped by self
const CLOCK_BOOTTIME: ClockId = _const CLOCK_BOOTTIME_ALARM: ClockId = _const CLOCK_MONOTONIC: ClockId = _const CLOCK_MONOTONIC_COARSE: ClockId = _const CLOCK_MONOTONIC_RAW: ClockId = _const CLOCK_PROCESS_CPUTIME_ID: ClockId = _const CLOCK_REALTIME: ClockId = _const CLOCK_REALTIME_ALARM: ClockId = _const CLOCK_REALTIME_COARSE: ClockId = _const CLOCK_THREAD_CPUTIME_ID: ClockId = _Trait Implementations
impl Debug for ClockId
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Resultimpl Display for ClockId
fn fmt(&Self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Resultimpl Hash for ClockId
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()impl Ord for ClockId
fn cmp(&Self, other: &ClockId) -> $crate::cmp::Orderingimpl PartialOrd<ClockId> for ClockId
fn partial_cmp(&Self, other: &ClockId) -> $crate::option::Option<$crate::cmp::Ordering>impl StructuralEq for ClockIdimpl StructuralPartialEq for ClockIdAuto Trait Implementations
impl RefUnwindSafe for ClockIdimpl UnwindSafe for ClockIdBlanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T