pub struct ToolExecution {
pub call: ToolCallBlock,
pub result: Option<ToolResultBlock>,
pub duration_ms: Option<i64>,
pub is_error: bool,
}Expand description
Paired tool call and result with execution metrics.
Represents a complete tool execution lifecycle: tool invocation → execution → result collection.
Fields§
§call: ToolCallBlockTool invocation request.
result: Option<ToolResultBlock>Execution result (None if incomplete, lost, or still pending).
duration_ms: Option<i64>Execution latency in milliseconds (result.timestamp - call.timestamp).
is_error: boolWhether this tool execution failed (error status in result).
Trait Implementations§
Source§impl Clone for ToolExecution
impl Clone for ToolExecution
Source§fn clone(&self) -> ToolExecution
fn clone(&self) -> ToolExecution
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 ToolExecution
impl Debug for ToolExecution
Source§impl<'de> Deserialize<'de> for ToolExecution
impl<'de> Deserialize<'de> for ToolExecution
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolExecution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolExecution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ToolExecution
impl Serialize for ToolExecution
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolExecution
impl RefUnwindSafe for ToolExecution
impl Send for ToolExecution
impl Sync for ToolExecution
impl Unpin for ToolExecution
impl UnwindSafe for ToolExecution
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