pub struct ToolResult {
pub tool_call_id: ToolCallId,
pub tool_name: ToolName,
pub input: JsonValue,
pub output: JsonValue,
pub provider_executed: bool,
pub dynamic: bool,
pub preliminary: bool,
pub execution_ms: Option<u64>,
pub tool_metadata: Option<JsonObject>,
pub provider_metadata: Option<ProviderMetadata>,
}Expand description
A tool result.
Fields§
§tool_call_id: ToolCallIdIdentifier of the tool call.
tool_name: ToolNameName of the tool.
input: JsonValueThe validated input.
output: JsonValueThe output value.
provider_executed: boolWhether the provider executed the tool.
dynamic: boolWhether the tool is dynamic.
preliminary: boolWhether this result will be superseded by a final one.
execution_ms: Option<u64>Execution time in milliseconds (client-executed tools).
tool_metadata: Option<JsonObject>Metadata from the tool definition.
provider_metadata: Option<ProviderMetadata>Provider-specific metadata.
Trait Implementations§
Source§impl Clone for ToolResult
impl Clone for ToolResult
Source§fn clone(&self) -> ToolResult
fn clone(&self) -> ToolResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ToolResult
impl Debug for ToolResult
Source§impl<'de> Deserialize<'de> for ToolResult
impl<'de> Deserialize<'de> for ToolResult
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
Source§impl PartialEq for ToolResult
impl PartialEq for ToolResult
Source§impl Serialize for ToolResult
impl Serialize for ToolResult
impl StructuralPartialEq for ToolResult
Auto Trait Implementations§
impl Freeze for ToolResult
impl RefUnwindSafe for ToolResult
impl Send for ToolResult
impl Sync for ToolResult
impl Unpin for ToolResult
impl UnsafeUnpin for ToolResult
impl UnwindSafe for ToolResult
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