pub enum TimerDirective {
Stop,
ContinueImmediately,
RetryAfter(Duration),
ScheduleAt(u64),
RecurAfter(Duration),
}Expand description
Scheduling decision returned after one bounded invocation.
Variants§
Stop
Do not schedule another invocation.
ContinueImmediately
Continue as soon as the runtime can execute another message.
RetryAfter(Duration)
Retry after the provided delay.
ScheduleAt(u64)
Schedule at an absolute IC timestamp in nanoseconds.
RecurAfter(Duration)
Recur after the provided delay measured from completion.
Implementations§
Source§impl TimerDirective
impl TimerDirective
Sourcepub fn deadline_ns(self, now_ns: u64) -> Result<Option<u64>, ScheduleError>
pub fn deadline_ns(self, now_ns: u64) -> Result<Option<u64>, ScheduleError>
Resolve this directive to its next absolute nanosecond deadline.
None means the timer should stop. Scheduling mode and retry semantics
remain available from the directive itself.
Trait Implementations§
Source§impl Clone for TimerDirective
impl Clone for TimerDirective
Source§fn clone(&self) -> TimerDirective
fn clone(&self) -> TimerDirective
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 TimerDirective
Source§impl Debug for TimerDirective
impl Debug for TimerDirective
impl Eq for TimerDirective
Source§impl From<TimerDirectiveSnapshot> for TimerDirective
impl From<TimerDirectiveSnapshot> for TimerDirective
Source§fn from(value: TimerDirectiveSnapshot) -> Self
fn from(value: TimerDirectiveSnapshot) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TimerDirective
impl PartialEq for TimerDirective
impl StructuralPartialEq for TimerDirective
Source§impl TryFrom<TimerDirective> for TimerDirectiveSnapshot
impl TryFrom<TimerDirective> for TimerDirectiveSnapshot
Source§type Error = ScheduleError
type Error = ScheduleError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for TimerDirective
impl RefUnwindSafe for TimerDirective
impl Send for TimerDirective
impl Sync for TimerDirective
impl Unpin for TimerDirective
impl UnsafeUnpin for TimerDirective
impl UnwindSafe for TimerDirective
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