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::Result
impl Display for ClockId
fn fmt(&Self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
impl Hash for ClockId
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl Ord for ClockId
fn cmp(&Self, other: &ClockId) -> $crate::cmp::Ordering
impl PartialOrd<ClockId> for ClockId
fn partial_cmp(&Self, other: &ClockId) -> $crate::option::Option<$crate::cmp::Ordering>
impl StructuralEq for ClockId
impl StructuralPartialEq for ClockId
Auto Trait Implementations
impl RefUnwindSafe for ClockId
impl UnwindSafe for ClockId
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T