pub struct AfterCompletionRunResult { /* private fields */ }Expand description
A classified after-completion result with one policy-valid proposal.
Recurrence uses only the registration’s configured cadence. Winning exact
reconciliation and terminal pending commands discard the proposal before
validation. An explicit invariant failure always stops.
Success, no work and retryable failure preserve the supplied decision;
recurrence requires AfterCompletionDecision::RecurAfterCompletion.
A retryable failure with Stop remains Stop.
As with OnceRunResult, construction does not validate relative delays;
the runtime checks a selected proposal after command arbitration. Configured
recurrence also checks the successor deadline against the completion time.
use ic_timers::{AfterCompletionRunResult, OnceDecision, TimerCompletion};
let result = AfterCompletionRunResult::new(
TimerCompletion::no_work(), OnceDecision::Stop,
);Implementations§
Source§impl AfterCompletionRunResult
impl AfterCompletionRunResult
Sourcepub const fn new(
completion: TimerCompletion,
decision: AfterCompletionDecision,
) -> Self
pub const fn new( completion: TimerCompletion, decision: AfterCompletionDecision, ) -> Self
Construct a result, forcing invariant failures to stop.
Sourcepub const fn completion(self) -> TimerCompletion
pub const fn completion(self) -> TimerCompletion
Return the completion classification and reported work count.
Sourcepub const fn decision(self) -> AfterCompletionDecision
pub const fn decision(self) -> AfterCompletionDecision
Return the post-run scheduling proposal.