pub struct Trace {
pub flow_id: String,
pub flow_version: u64,
pub steps: Vec<TraceStep>,
pub outcome: FlowOutcome,
pub error: Option<String>,
/* private fields */
}Expand description
The full record of one run of a flow against one caller.
Owned by the caller of crate::engine::run, not the engine — so a
daemon that races the run against the dialog’s death still holds every
step executed up to the drop (a caller hanging up mid-menu is exactly the
trace worth keeping).
Fields§
§flow_id: String§flow_version: u64§steps: Vec<TraceStep>§outcome: FlowOutcome§error: Option<String>Set when the run ended abnormally (Aborted/Defect) — the
underlying effect or engine error, for logs. None on a clean run.
Implementations§
Source§impl Trace
impl Trace
Sourcepub fn new(flow_id: &str, flow_version: u64) -> Self
pub fn new(flow_id: &str, flow_version: u64) -> Self
Start an empty trace for one run. outcome begins as
FlowOutcome::Defect and is replaced when the engine finishes; a
trace whose run was cancelled (dropped mid-select) keeps the
placeholder — consumers that saw the cancellation should trust their
own end signal, not this field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnsafeUnpin for Trace
impl UnwindSafe for Trace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more