Enum timerfd::TimerState
source · pub enum TimerState {
Disarmed,
Oneshot(Duration),
Periodic {
current: Duration,
interval: Duration,
},
}
Expand description
Holds the state of a TimerFd
.
Variants§
Disarmed
The timer is disarmed and will not fire.
Oneshot(Duration)
The timer will fire once after the specified duration and then disarm.
Periodic
The timer will fire once after current
and then
automatically rearm with interval
as its duration.
Trait Implementations§
source§impl Clone for TimerState
impl Clone for TimerState
source§fn clone(&self) -> TimerState
fn clone(&self) -> TimerState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TimerState
impl Debug for TimerState
source§impl From<TimerState> for Itimerspec
impl From<TimerState> for Itimerspec
source§fn from(ts: TimerState) -> Itimerspec
fn from(ts: TimerState) -> Itimerspec
Converts to this type from the input type.
source§impl From<__kernel_itimerspec> for TimerState
impl From<__kernel_itimerspec> for TimerState
source§fn from(its: Itimerspec) -> TimerState
fn from(its: Itimerspec) -> TimerState
Converts to this type from the input type.
source§impl PartialEq for TimerState
impl PartialEq for TimerState
source§fn eq(&self, other: &TimerState) -> bool
fn eq(&self, other: &TimerState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TimerState
impl StructuralPartialEq for TimerState
Auto Trait Implementations§
impl Freeze for TimerState
impl RefUnwindSafe for TimerState
impl Send for TimerState
impl Sync for TimerState
impl Unpin for TimerState
impl UnwindSafe for TimerState
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