Skip to main content

Run

Struct Run 

Source
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

Source

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.

Source

pub fn status(&self) -> &RunStatus

How the run ended.

Source

pub fn workflows(&self) -> impl Iterator<Item = WorkflowRecord<'_>>

Every workflow considered, in WorkflowIx order, up to and including the one that stopped the run.

Source

pub fn matched(&self) -> usize

How many workflows were selected and ran.

Source

pub fn retryable(&self) -> bool

May running the message again succeed? True for a timeout and for a stop whose error says so.

Source

pub fn partial(&self) -> bool

Did the run end before every workflow was considered?

Source

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.

Source

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 Debug for Run

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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.

Source§

fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Run

§

impl !UnwindSafe for Run

§

impl Freeze for Run

§

impl Send for Run

§

impl Sync for Run

§

impl Unpin for Run

§

impl UnsafeUnpin for Run

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.