pub enum TimerExpMode {
None,
OneShot {
sec: i64,
nsec: i64,
},
IntervalDelayed {
delay_sec: i64,
delay_nsec: i64,
interv_sec: i64,
interv_nsec: i64,
},
Interval {
sec: i64,
nsec: i64,
},
}Expand description
A timer expiry modes. Not every OS supports
every mode. Read comments for the OS specific
timer. For the nanoseconds param the max value
is 999_999_999 for most OSes.
Variants§
None
Disarmed
OneShot
A timer which is triggered once.
IntervalDelayed
Interval with the initial delay.
Fields
Interval
Interval, with the first timeout event equal to interval values.
Implementations§
Trait Implementations§
Source§impl Clone for TimerExpMode
impl Clone for TimerExpMode
Source§fn clone(&self) -> TimerExpMode
fn clone(&self) -> TimerExpMode
Returns a duplicate 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 TimerExpMode
impl Debug for TimerExpMode
Source§impl Display for TimerExpMode
impl Display for TimerExpMode
Source§impl From<TimerExpMode> for itimerspec
impl From<TimerExpMode> for itimerspec
Source§fn from(value: TimerExpMode) -> Self
fn from(value: TimerExpMode) -> Self
Converts to this type from the input type.
Source§impl From<itimerspec> for TimerExpMode
impl From<itimerspec> for TimerExpMode
Source§fn from(value: itimerspec) -> Self
fn from(value: itimerspec) -> Self
Converts to this type from the input type.
Source§impl Ord for TimerExpMode
impl Ord for TimerExpMode
Source§impl PartialEq for TimerExpMode
impl PartialEq for TimerExpMode
Source§impl PartialOrd for TimerExpMode
impl PartialOrd for TimerExpMode
impl Copy for TimerExpMode
impl Eq for TimerExpMode
impl StructuralPartialEq for TimerExpMode
Auto Trait Implementations§
impl Freeze for TimerExpMode
impl RefUnwindSafe for TimerExpMode
impl Send for TimerExpMode
impl Sync for TimerExpMode
impl Unpin for TimerExpMode
impl UnwindSafe for TimerExpMode
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