pub enum TimerState {
Inactive,
Timeout {
deadline: Instant,
},
Interval {
deadline: Instant,
interval: Duration,
},
}
Expand description
Timers will be in one of these states.
Variants§
Inactive
The timer is inactive. This is the default state.
Timeout
The timer is configured to tick once, when the deadline is reached.
Interval
The timer is configured to tick when the deadline is reached, and to repeat at a set interval.
Implementations§
Trait Implementations§
Source§impl Clone for TimerState
impl Clone for TimerState
Source§fn clone(&self) -> TimerState
fn clone(&self) -> TimerState
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 TimerState
impl Debug for TimerState
Source§impl Default for TimerState
impl Default for TimerState
Source§impl Hash for TimerState
impl Hash for TimerState
Source§impl Ord for TimerState
impl Ord for TimerState
Source§fn cmp(&self, other: &TimerState) -> Ordering
fn cmp(&self, other: &TimerState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TimerState
impl PartialEq for TimerState
Source§impl PartialOrd for TimerState
impl PartialOrd for TimerState
impl Copy for TimerState
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