pub enum Disposition {
Resume(ResumeKind),
Recover,
Sleeping {
wake_at: OffsetDateTime,
},
Reconcile(PendingCall),
Completed(Value),
Failed(String),
Abandoned {
reason: Option<String>,
unresolved_write: Option<UnresolvedWrite>,
},
NotStarted,
}Expand description
What to do with a run, decided from its derived state alone.
Variants§
Resume(ResumeKind)
The run is parked and resumes with a validated input.
Recover
The run crashed mid-step and recovers with no input.
Sleeping
The run is parked on a durable timer. Carries the recorded wake instant, which is both the evidence a refusal names and the value the caller tests its clock against.
The clock is not read here, and the disposition is not “recover” or
“refuse” on its own, because this module holds no clock and must not:
the same state means “drive it” to a waker whose sweep found the run
due and “refuse” to a person resuming it an hour early, and only the
caller knows which it is. Both surfaces compare wake_at against the
clock they already drive with, so neither can decide differently from
the RunCtx::await_wake that
enforces the deadline inside the run.
Fields
wake_at: OffsetDateTimeThe instant the run’s recorded SleepStarted said it may continue
at.
Reconcile(PendingCall)
The run needs human reconciliation. Carries the dangling write intent so the caller can show it as evidence.
Completed(Value)
The run already finished with this output.
Failed(String)
The run already failed with this error.
Abandoned
The run was abandoned by an operator. A terminal resting state, reported and left alone exactly as completed or failed is, distinct from failure.
Fields
unresolved_write: Option<UnresolvedWrite>The write intent left unsettled when a needs-reconciliation run was abandoned, when there was one.
NotStarted
The log is empty; there is no run to continue.
Trait Implementations§
Source§impl Clone for Disposition
impl Clone for Disposition
Source§fn clone(&self) -> Disposition
fn clone(&self) -> Disposition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more