pub struct NodeExecutionResult {
pub started_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub result: ExecutionResult,
pub retry_count: u32,
pub metrics: Option<NodeMetrics>,
}Expand description
Result of executing a single node
Fields§
§started_at: DateTime<Utc>When this node started executing
completed_at: Option<DateTime<Utc>>When this node finished executing
result: ExecutionResultThe result of the execution
retry_count: u32Number of retry attempts made (0 means no retries)
metrics: Option<NodeMetrics>Execution metrics (token usage, costs, etc.)
Implementations§
Source§impl NodeExecutionResult
impl NodeExecutionResult
pub fn new() -> Self
pub fn complete(self, result: ExecutionResult) -> Self
Sourcepub fn with_metrics(self, metrics: NodeMetrics) -> Self
pub fn with_metrics(self, metrics: NodeMetrics) -> Self
Add metrics to the execution result
Sourcepub fn with_token_usage(self, usage: TokenUsage) -> Self
pub fn with_token_usage(self, usage: TokenUsage) -> Self
Add token usage to the execution result
Sourcepub fn duration_ms(&self) -> Option<u64>
pub fn duration_ms(&self) -> Option<u64>
Get execution duration in milliseconds
Sourcepub fn total_tokens(&self) -> Option<u32>
pub fn total_tokens(&self) -> Option<u32>
Get total token count
Trait Implementations§
Source§impl Clone for NodeExecutionResult
impl Clone for NodeExecutionResult
Source§fn clone(&self) -> NodeExecutionResult
fn clone(&self) -> NodeExecutionResult
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 moreSource§impl Debug for NodeExecutionResult
impl Debug for NodeExecutionResult
Source§impl Default for NodeExecutionResult
impl Default for NodeExecutionResult
Source§impl<'de> Deserialize<'de> for NodeExecutionResult
impl<'de> Deserialize<'de> for NodeExecutionResult
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 NodeExecutionResult
impl RefUnwindSafe for NodeExecutionResult
impl Send for NodeExecutionResult
impl Sync for NodeExecutionResult
impl Unpin for NodeExecutionResult
impl UnwindSafe for NodeExecutionResult
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