pub struct TimerContext { /* private fields */ }Expand description
Delegated exact registration capability passed to consumer work.
Implementations§
Source§impl TimerContext
impl TimerContext
Sourcepub const fn identity(&self) -> &TimerIdentity
pub const fn identity(&self) -> &TimerIdentity
Return the logical timer identity executing this work.
Sourcepub fn ensure_once(&self, schedule: TimerSchedule) -> Result<(), TimerError>
pub fn ensure_once(&self, schedule: TimerSchedule) -> Result<(), TimerError>
Schedule a Once declaration from consumer work.
Sourcepub fn reconcile_schedule(
&self,
schedule: Option<TimerSchedule>,
) -> Result<(), TimerError>
pub fn reconcile_schedule( &self, schedule: Option<TimerSchedule>, ) -> Result<(), TimerError>
Reconcile the executing ordinary declaration to one exact schedule.
None cancels live work while retaining callback authority. Watchdog
declarations reject this operation.
Sourcepub fn ensure_recurring(&self) -> Result<(), TimerError>
pub fn ensure_recurring(&self) -> Result<(), TimerError>
Ensure an after-completion or watchdog declaration has one wake-up.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Request cancellation using the exact executing registration claim.
Auto Trait Implementations§
impl Freeze for TimerContext
impl RefUnwindSafe for TimerContext
impl Send for TimerContext
impl Sync for TimerContext
impl Unpin for TimerContext
impl UnsafeUnpin for TimerContext
impl UnwindSafe for TimerContext
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