pub struct ToolCallBlock {
pub block_type: String,
pub id: Option<String>,
pub name: String,
pub args: HashMap<String, Value>,
pub index: Option<BlockIndex>,
pub extras: Option<HashMap<String, Value>>,
}Expand description
Represents an AI’s request to call a tool (content block version).
This version includes a type field for discrimination and is used
as part of content blocks.
Fields§
§block_type: StringType of the content block. Always “tool_call”.
id: Option<String>An identifier associated with the tool call.
name: StringThe name of the tool to be called.
args: HashMap<String, Value>The arguments to the tool call.
index: Option<BlockIndex>Index of block in aggregate response. Used during streaming.
extras: Option<HashMap<String, Value>>Provider-specific metadata.
Implementations§
Trait Implementations§
Source§impl Clone for ToolCallBlock
impl Clone for ToolCallBlock
Source§fn clone(&self) -> ToolCallBlock
fn clone(&self) -> ToolCallBlock
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 ToolCallBlock
impl Debug for ToolCallBlock
Source§impl<'de> Deserialize<'de> for ToolCallBlock
impl<'de> Deserialize<'de> for ToolCallBlock
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 ToolCallBlock
impl PartialEq for ToolCallBlock
Source§impl Serialize for ToolCallBlock
impl Serialize for ToolCallBlock
impl StructuralPartialEq for ToolCallBlock
Auto Trait Implementations§
impl Freeze for ToolCallBlock
impl RefUnwindSafe for ToolCallBlock
impl Send for ToolCallBlock
impl Sync for ToolCallBlock
impl Unpin for ToolCallBlock
impl UnwindSafe for ToolCallBlock
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