pub struct Run { /* private fields */ }Expand description
The report of one run: how it ended, what each workflow did, and its trace when one was asked for.
Implementations§
Source§impl Run
impl Run
Sourcepub fn trace(&self) -> Option<&Trace>
pub fn trace(&self) -> Option<&Trace>
The run’s trace, when RunOptions::trace
asked for one: on every status, the step that stopped the run
included. A run stopped between ops made no step for the stop, and
one stopped as a sweep starts only the engine’s step for the counter
it wrote; either way the trace replays to the message’s context.
Sourcepub fn workflows(&self) -> impl Iterator<Item = WorkflowRecord<'_>>
pub fn workflows(&self) -> impl Iterator<Item = WorkflowRecord<'_>>
Every workflow considered, in WorkflowIx order, up to and including
the one that stopped the run.
Sourcepub fn retryable(&self) -> bool
pub fn retryable(&self) -> bool
May running the message again succeed? True for a timeout and for a stop whose error says so.
Sourcepub fn take_trace(&mut self) -> Option<Trace>
pub fn take_trace(&mut self) -> Option<Trace>
The run’s trace, taken out of the report, which keeps none after.
Take it before into_result when the trace is
wanted on every status: into_result drops the report, the trace
with it, on exactly the runs that stopped.
Sourcepub fn into_result(self) -> Result<Self>
pub fn into_result(self) -> Result<Self>
Ok(self) unless the run was stopped, timed out or cancelled, which
become the error, the report and its trace dropped; take the trace
first with take_trace to keep it.
Trait Implementations§
Source§impl Serialize for Run
Writes a run as {"status", "error"?, "retryable", "partial", "matched", "workflows"}: error only for a stopped run, workflows the
records of Run::workflows. Neither the trace nor the arena counters
are part of it. A Run has no Deserialize, since it holds its
program.
impl Serialize for Run
Writes a run as {"status", "error"?, "retryable", "partial", "matched", "workflows"}: error only for a stopped run, workflows the
records of Run::workflows. Neither the trace nor the arena counters
are part of it. A Run has no Deserialize, since it holds its
program.