#[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 chunk-scoped.
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. This field is chunk-scoped.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for ToolCallContentChunk
impl Clone for ToolCallContentChunk
Source§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>,
impl Eq for ToolCallContentChunk
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§impl Serialize for ToolCallContentChunk
impl Serialize for ToolCallContentChunk
impl StructuralPartialEq for ToolCallContentChunk
Auto Trait Implementations§
impl Freeze for ToolCallContentChunk
impl RefUnwindSafe for ToolCallContentChunk
impl Send for ToolCallContentChunk
impl Sync for ToolCallContentChunk
impl Unpin for ToolCallContentChunk
impl UnsafeUnpin for ToolCallContentChunk
impl UnwindSafe for ToolCallContentChunk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.