pub struct ToolCallChunkEvent {
pub base: BaseEvent,
pub tool_call_id: Option<ToolCallId>,
pub tool_call_name: Option<String>,
pub parent_message_id: Option<MessageId>,
pub delta: Option<String>,
}Expand description
Event containing a chunk of tool call content.
This event combines start, args, and potentially end information in a single event. Used as a non-streaming alternative where all fields may be optional.
Fields§
§base: BaseEventCommon event fields (timestamp, rawEvent).
tool_call_id: Option<ToolCallId>Optional tool call ID (may be omitted for continuation chunks).
tool_call_name: Option<String>Optional tool name.
parent_message_id: Option<MessageId>Optional parent message ID.
delta: Option<String>Optional argument delta.
Implementations§
Source§impl ToolCallChunkEvent
impl ToolCallChunkEvent
Sourcepub fn with_tool_call_id(self, tool_call_id: impl Into<ToolCallId>) -> Self
pub fn with_tool_call_id(self, tool_call_id: impl Into<ToolCallId>) -> Self
Sets the tool call ID.
Sourcepub fn with_tool_call_name(self, name: impl Into<String>) -> Self
pub fn with_tool_call_name(self, name: impl Into<String>) -> Self
Sets the tool call name.
Sourcepub fn with_parent_message_id(self, message_id: impl Into<MessageId>) -> Self
pub fn with_parent_message_id(self, message_id: impl Into<MessageId>) -> Self
Sets the parent message ID.
Sourcepub fn with_delta(self, delta: impl Into<String>) -> Self
pub fn with_delta(self, delta: impl Into<String>) -> Self
Sets the delta.
Sourcepub fn with_timestamp(self, timestamp: f64) -> Self
pub fn with_timestamp(self, timestamp: f64) -> Self
Sets the timestamp for this event.
Trait Implementations§
Source§impl Clone for ToolCallChunkEvent
impl Clone for ToolCallChunkEvent
Source§fn clone(&self) -> ToolCallChunkEvent
fn clone(&self) -> ToolCallChunkEvent
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 ToolCallChunkEvent
impl Debug for ToolCallChunkEvent
Source§impl Default for ToolCallChunkEvent
impl Default for ToolCallChunkEvent
Source§impl<'de> Deserialize<'de> for ToolCallChunkEvent
impl<'de> Deserialize<'de> for ToolCallChunkEvent
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 ToolCallChunkEvent
impl PartialEq for ToolCallChunkEvent
Source§impl Serialize for ToolCallChunkEvent
impl Serialize for ToolCallChunkEvent
impl StructuralPartialEq for ToolCallChunkEvent
Auto Trait Implementations§
impl Freeze for ToolCallChunkEvent
impl RefUnwindSafe for ToolCallChunkEvent
impl Send for ToolCallChunkEvent
impl Sync for ToolCallChunkEvent
impl Unpin for ToolCallChunkEvent
impl UnsafeUnpin for ToolCallChunkEvent
impl UnwindSafe for ToolCallChunkEvent
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