pub enum StreamEvent {
TextChunk(String),
ToolCallStart {
id: String,
name: String,
},
ToolCallArgs {
id: String,
args_delta: String,
},
ToolCallEnd {
id: String,
args: Value,
},
Done {
finish_reason: FinishReason,
},
}Expand description
Streaming event emitted from chat_stream().
Variants§
TextChunk(String)
Incremental assistant text.
ToolCallStart
Start marker for a tool call (id + name known, args incoming).
ToolCallArgs
Partial tool-call argument delta (provider-specific JSON fragment).
ToolCallEnd
Tool call complete with parsed arguments.
Done
Stream terminated.
Fields
§
finish_reason: FinishReasonTrait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§fn clone(&self) -> StreamEvent
fn clone(&self) -> StreamEvent
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 moreAuto Trait Implementations§
impl Freeze for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
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