#[non_exhaustive]pub struct ToolCallContentChunk {
pub tool_call_id: ToolCallId,
pub content: ToolCallContent,
pub meta: Option<Meta>,
}unstable_protocol_v2 only.Expand description
A streamed item of tool-call content.
Tool-call content chunks append one ToolCallContent item to the current
content for the matching ToolCallId. Agents can use
ToolCallUpdate::content when they need to replace the whole content
collection instead.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tool_call_id: ToolCallIdThe ID of the tool call this content belongs to.
content: ToolCallContentA single item of content produced by the tool call.
meta: Option<Meta>The _meta property is reserved by ACP to allow clients and agents to attach additional
metadata to their interactions. Implementations MUST NOT make assumptions about values at
these keys. This field is optional; omitted or null means there is no
chunk-level metadata.
See protocol docs: Extensibility
Implementations§
Source§impl ToolCallContentChunk
impl ToolCallContentChunk
Sourcepub fn new(
tool_call_id: impl Into<ToolCallId>,
content: impl Into<ToolCallContent>,
) -> Self
pub fn new( tool_call_id: impl Into<ToolCallId>, content: impl Into<ToolCallContent>, ) -> Self
Builds ToolCallContentChunk with the required fields set; optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Meta>) -> Self
pub fn meta(self, meta: impl IntoOption<Meta>) -> Self
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for ToolCallContentChunk
impl Clone for ToolCallContentChunk
Source§fn clone(&self) -> ToolCallContentChunk
fn clone(&self) -> ToolCallContentChunk
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolCallContentChunk
impl Debug for ToolCallContentChunk
Source§impl<'de> Deserialize<'de> for ToolCallContentChunk
impl<'de> Deserialize<'de> for ToolCallContentChunk
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>,
Source§impl JsonSchema for ToolCallContentChunk
impl JsonSchema for ToolCallContentChunk
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ToolCallContentChunk
impl PartialEq for ToolCallContentChunk
Source§fn eq(&self, other: &ToolCallContentChunk) -> bool
fn eq(&self, other: &ToolCallContentChunk) -> bool
self and other values to be equal, and is used by ==.