pub struct AfterCompletionRegistration { /* private fields */ }Expand description
Opaque non-clone claim for one callback with configured after-completion recurrence.
Implementations§
Source§impl AfterCompletionRegistration
impl AfterCompletionRegistration
Sourcepub const fn identity(&self) -> &TimerIdentity
pub const fn identity(&self) -> &TimerIdentity
Return the claimed logical identity.
Sourcepub fn has_armed_wakeup(&self) -> Result<bool, TimerError>
pub fn has_armed_wakeup(&self) -> Result<bool, TimerError>
Return whether this exact claim currently owns an armed provider wake-up.
A callback currently running without an installed successor returns
false. This is a volatile observation, not durable scheduling authority
or a delivery guarantee.
Sourcepub fn ensure_scheduled(&self) -> Result<(), TimerError>
pub fn ensure_scheduled(&self) -> Result<(), TimerError>
Ensure configured recurrence is armed or retained as the running work’s successor.
Sourcepub fn reconcile_schedule(
&self,
schedule: Option<TimerSchedule>,
) -> Result<(), TimerError>
pub fn reconcile_schedule( &self, schedule: Option<TimerSchedule>, ) -> Result<(), TimerError>
Reconcile to one exact desired schedule without changing the configured
after-completion cadence. None makes a retained declaration inactive
after any running work completes; it removes a remove-on-stop
declaration and expires this claim when the transition finalizes.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Cancel the armed callback or the running work’s successor.
Consumer work already running is not interrupted. A retained declaration keeps callback authority. A remove-on-stop declaration and this claim expire when cancellation finalizes.
Sourcepub fn unregister(self) -> Result<(), TimerError>
pub fn unregister(self) -> Result<(), TimerError>
Consume the claim and unregister its callback authority.
When called from running work, removal is deferred until that invocation completes normally.