Skip to main content

TraceStep

Struct TraceStep 

Source
#[non_exhaustive]
pub struct TraceStep { pub workflow: WorkflowIx, pub workflow_id: Arc<str>, pub task: Option<TaskIx>, pub task_id: Option<Arc<str>>, pub result: StepResult, pub status: Option<u16>, pub changes: Vec<Change>, pub mapping_ends: Vec<u32>, pub errors: Vec<ErrorRecord>, pub elapsed: Option<Duration>, pub loop_counter: Option<i64>, pub element_index: Option<usize>, }
Expand description

One step of a Trace.

Written with its keys in this order. mapping_ends and errors are absent when empty, and elapsed_us (in whole microseconds), loop_counter and element_index when there is none. Read back from what it writes: elapsed_us as the whole microseconds written, and an absent mapping_ends or errors as empty.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§workflow: WorkflowIx

The workflow’s position in the program.

§workflow_id: Arc<str>

The workflow’s id.

§task: Option<TaskIx>

The task’s position in the program; null for the workflow’s own step: its skip, its failure, or the engine’s writes as a sweep is entered.

§task_id: Option<Arc<str>>

The task’s id; null when task is.

§result: StepResult

What the step was.

§status: Option<u16>

The call’s status; null for a skip, a call whose outcome was a skip, and the engine’s step.

§changes: Vec<Change>

The step’s changes in order: the engine’s writes made for it first (a fan-out’s into pre-fill), then the call’s own, then the progress write, then the error context’s. Empty past the byte budget and when the trace records none.

§mapping_ends: Vec<u32>

Where each of a map’s mappings ends in changes: one entry per mapping, in order, the index just past its last change, so mapping i’s changes run from the end before it (0 for the first) up to its own. A mapping that wrote nothing repeats the end before it. Replaying the changes before mapping i’s end gives the context after mapping i. Empty for every other step, and whenever changes is.

§errors: Vec<ErrorRecord>

Every record the step added to the message, in the message’s order: the call’s own, then the engine’s; for a workflow’s own failure, its record. A workflow whose condition failed to evaluate adds none to the message, and its skipped step holds that failure’s record.

§elapsed: Option<Duration>

How long the call ran, written in whole microseconds, when the trace asked for timings.

§loop_counter: Option<i64>

The loop counter of the sweep: the call’s, or the one the engine’s step wrote.

§element_index: Option<usize>

The fan-out element the call ran for.

Trait Implementations§

Source§

impl Clone for TraceStep

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TraceStep

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TraceStep

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TraceStep

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.