pub struct WorkflowTrace {
pub workflow_id: String,
pub start_nanos: u64,
pub end_nanos: Option<u64>,
pub steps: Vec<WorkflowStep>,
pub total_duration: Duration,
pub user: String,
pub agent_id: Option<String>,
}Expand description
Workflow trace
Fields§
§workflow_id: StringWorkflow ID
start_nanos: u64Start timestamp
end_nanos: Option<u64>End timestamp (if completed)
steps: Vec<WorkflowStep>Steps in workflow
total_duration: DurationTotal duration
user: StringUser who initiated
agent_id: Option<String>Agent/client identifier
Implementations§
Source§impl WorkflowTrace
impl WorkflowTrace
Sourcepub fn new(workflow_id: impl Into<String>, user: impl Into<String>) -> Self
pub fn new(workflow_id: impl Into<String>, user: impl Into<String>) -> Self
Create new workflow trace
Sourcepub fn add_step(&mut self, step: WorkflowStep)
pub fn add_step(&mut self, step: WorkflowStep)
Add step
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if completed
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Get step count
Sourcepub fn error_count(&self) -> usize
pub fn error_count(&self) -> usize
Get error count
Trait Implementations§
Source§impl Clone for WorkflowTrace
impl Clone for WorkflowTrace
Source§fn clone(&self) -> WorkflowTrace
fn clone(&self) -> WorkflowTrace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowTrace
impl RefUnwindSafe for WorkflowTrace
impl Send for WorkflowTrace
impl Sync for WorkflowTrace
impl Unpin for WorkflowTrace
impl UnsafeUnpin for WorkflowTrace
impl UnwindSafe for WorkflowTrace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more