pub enum StreamDelta {
Text(String),
ToolCall {
id: Option<String>,
name: Option<String>,
input_delta: String,
},
Done {
usage: TokenUsage,
},
}Expand description
One incremental event in a streaming chat response.
Variants§
Text(String)
A chunk of generated text.
ToolCall
A streamed tool call (arguments may arrive incrementally).
Fields
Done
Terminal event carrying final usage.
Fields
§
usage: TokenUsageFinal token usage.
Trait Implementations§
Source§impl Clone for StreamDelta
impl Clone for StreamDelta
Source§fn clone(&self) -> StreamDelta
fn clone(&self) -> StreamDelta
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 moreSource§impl Debug for StreamDelta
impl Debug for StreamDelta
Source§impl PartialEq for StreamDelta
impl PartialEq for StreamDelta
Source§fn eq(&self, other: &StreamDelta) -> bool
fn eq(&self, other: &StreamDelta) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for StreamDelta
Auto Trait Implementations§
impl Freeze for StreamDelta
impl RefUnwindSafe for StreamDelta
impl Send for StreamDelta
impl Sync for StreamDelta
impl Unpin for StreamDelta
impl UnsafeUnpin for StreamDelta
impl UnwindSafe for StreamDelta
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