pub struct TraceStep {
pub step_type: StepType,
pub name: String,
pub start_time_ms: u64,
pub duration_ms: u64,
pub input: Option<Value>,
pub output: Option<Value>,
pub metadata: HashMap<String, String>,
pub error: Option<String>,
}Expand description
A single step in the execution trace
Fields§
§step_type: StepTypeStep type
name: StringStep name/description
start_time_ms: u64Unix timestamp when step started (milliseconds)
duration_ms: u64Duration in milliseconds
input: Option<Value>Input data (JSON-serializable)
output: Option<Value>Output data (JSON-serializable)
metadata: HashMap<String, String>Additional metadata
error: Option<String>Error message if step failed
Implementations§
Source§impl TraceStep
impl TraceStep
Sourcepub fn with_input(self, input: Value) -> Self
pub fn with_input(self, input: Value) -> Self
Set input data
Sourcepub fn with_output(self, output: Value) -> Self
pub fn with_output(self, output: Value) -> Self
Set output data
Sourcepub fn with_duration(self, duration_ms: u64) -> Self
pub fn with_duration(self, duration_ms: u64) -> Self
Set duration
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add metadata
Sourcepub fn with_error(self, error: impl Into<String>) -> Self
pub fn with_error(self, error: impl Into<String>) -> Self
Set error
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TraceStep
impl<'de> Deserialize<'de> for TraceStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TraceStep
impl RefUnwindSafe for TraceStep
impl Send for TraceStep
impl Sync for TraceStep
impl Unpin for TraceStep
impl UnwindSafe for TraceStep
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