pub struct Run<S> { /* private fields */ }Implementations§
Source§impl Run<Active>
impl Run<Active>
Sourcepub fn dispatch(
plan: RunPlan,
ledger: &mut dyn Ledger,
hooks: &mut RunHooks<'_>,
) -> Result<Run<Active>, AxError>
pub fn dispatch( plan: RunPlan, ledger: &mut dyn Ledger, hooks: &mut RunHooks<'_>, ) -> Result<Run<Active>, AxError>
The dispatch pair: the job pin lands first, then the run exists.
Two ledger lines, two clock samples — the pin is a fact about the
city and the start is a fact about the run. Written by the plan’s
charter, the one author of every run’s opening (crates/runtime/spec/Run.lean
§8-52).
§Errors
Propagates whatever the ledger says; nothing else here can fail.
Sourcepub fn advance(
&mut self,
ledger: &mut dyn Ledger,
model: &mut dyn Model,
hooks: &mut RunHooks<'_>,
) -> Result<Advance, AxError>
pub fn advance( &mut self, ledger: &mut dyn Ledger, model: &mut dyn Model, hooks: &mut RunHooks<'_>, ) -> Result<Advance, AxError>
Takes one turn. Every exit from a phase is either the next phase or a cancellation, so the three safe points are the only places an interruption can land.
§Errors
Propagates ledger and provider failures. A tool failure is not one of them: it reaches the model as this call’s result.
Sourcepub fn freeze(
self,
ledger: &mut dyn Ledger,
handoff: &Handoff,
completion: Completion,
hooks: &mut RunHooks<'_>,
) -> Result<Run<Frozen>, AxError>
pub fn freeze( self, ledger: &mut dyn Ledger, handoff: &Handoff, completion: Completion, hooks: &mut RunHooks<'_>, ) -> Result<Run<Frozen>, AxError>
The only exit. Both lines are written here, so no caller can end a run by simply dropping it and leaving the ledger without a verdict.
A cancelled run freezes inside the turn it interrupted and carries
that turn’s stamp; any other ending samples the clock once, and
run_frozen follows one millisecond later because the two lines
record one event.
§Errors
Propagates ledger failures and a clock that has run past u64.
pub fn turns_taken(&self) -> u32
Source§impl Run<Frozen>
impl Run<Frozen>
pub fn completion(&self) -> &Completion
Sourcepub fn plan(&self) -> &RunPlan
pub fn plan(&self) -> &RunPlan
What this run was dispatched with, for a successor that takes the same work on.
Sourcepub fn transcript(&self) -> Result<Transcript, AxError>
pub fn transcript(&self) -> Result<Transcript, AxError>
What the model saw, scanned and ready to write beside the room.
§Errors
Propagates a message that will not serialise.