pub enum TimerPolicy {
Once,
AfterCompletion {
cadence_ns: u64,
},
Watchdog {
cadence_ns: u64,
},
}Expand description
Configured recurrence policy for one logical timer.
Variants§
Once
Run at most once unless an explicit later request schedules it again.
AfterCompletion
Arm the next run after the current callback completes.
Watchdog
Pre-arm a successor before invoking fallible work.
Implementations§
Source§impl TimerPolicy
impl TimerPolicy
Sourcepub const fn cadence_ns(self) -> Option<u64>
pub const fn cadence_ns(self) -> Option<u64>
Return a configured cadence when the policy recurs.
Sourcepub const fn initial_mode(self) -> TimerSchedulingMode
pub const fn initial_mode(self) -> TimerSchedulingMode
Return the initial effective scheduling mode.
Trait Implementations§
Source§impl Clone for TimerPolicy
impl Clone for TimerPolicy
Source§fn clone(&self) -> TimerPolicy
fn clone(&self) -> TimerPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TimerPolicy
Source§impl Debug for TimerPolicy
impl Debug for TimerPolicy
impl Eq for TimerPolicy
Source§impl Hash for TimerPolicy
impl Hash for TimerPolicy
Source§impl Ord for TimerPolicy
impl Ord for TimerPolicy
Source§fn cmp(&self, other: &TimerPolicy) -> Ordering
fn cmp(&self, other: &TimerPolicy) -> Ordering
1.21.0 (const: unstable) · 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 TimerPolicy
impl PartialEq for TimerPolicy
Source§impl PartialOrd for TimerPolicy
impl PartialOrd for TimerPolicy
impl StructuralPartialEq for TimerPolicy
Auto Trait Implementations§
impl Freeze for TimerPolicy
impl RefUnwindSafe for TimerPolicy
impl Send for TimerPolicy
impl Sync for TimerPolicy
impl Unpin for TimerPolicy
impl UnsafeUnpin for TimerPolicy
impl UnwindSafe for TimerPolicy
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