pub struct AfterCompletionContext { /* private fields */ }Expand description
Delegated control capability scoped to one exact after-completion work attempt.
Mutation authority expires when the callback completes. Retain the
AfterCompletionRegistration for longer-lived ownership.
Implementations§
Source§impl AfterCompletionContext
impl AfterCompletionContext
Sourcepub const fn identity(&self) -> &TimerIdentity
pub const fn identity(&self) -> &TimerIdentity
Return the logical timer identity executing this work.
Sourcepub fn ensure_scheduled(&self) -> Result<(), TimerError>
pub fn ensure_scheduled(&self) -> Result<(), TimerError>
Request configured recurrence after this exact work attempt.
Sourcepub fn reconcile_schedule(
&self,
schedule: Option<TimerSchedule>,
) -> Result<(), TimerError>
pub fn reconcile_schedule( &self, schedule: Option<TimerSchedule>, ) -> Result<(), TimerError>
Reconcile the executing declaration to one exact schedule without changing its configured after-completion cadence.
None requests inactive state at normal completion. A retained
declaration keeps its callback authority; a remove-on-stop declaration
is removed when cancellation wins arbitration. A stored context cannot
mutate the registration after its exact work attempt ends.
Sourcepub fn cancel(&self) -> Result<(), TimerError>
pub fn cancel(&self) -> Result<(), TimerError>
Request cancellation while this exact work attempt is active.
Cancellation does not interrupt the current invocation; normal completion applies it before any callback successor is retained. A retained declaration becomes inactive; a remove-on-stop declaration is removed when cancellation wins arbitration.