#[non_exhaustive]pub enum ChatDelta {
Text(String),
Reasoning(String),
ToolCall {
index: usize,
id: Option<String>,
name: Option<String>,
arguments: String,
},
Usage(Usage),
Finish(FinishReason),
ProviderState(Value),
Warning(String),
Failover(FailoverReport),
}Expand description
One streamed increment.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(String)
Visible answer text.
Reasoning(String)
Reasoning / thinking text.
ToolCall
Fragment of a tool call. Fragments sharing index belong to the same call;
id and name usually arrive on the first fragment only.
Usage(Usage)
Cumulative usage snapshot; the last one wins.
Finish(FinishReason)
ProviderState(Value)
Opaque provider state for the assistant message; the last one wins.
Warning(String)
Something the provider adapter changed or dropped while translating the request (e.g. unsupported JSON Schema keywords). Surfaced in node metadata.
Failover(FailoverReport)
The call failed over: the model that answers and the ones left before
it (first delta of a crate::failover::FailoverModel stream).
Trait Implementations§
impl StructuralPartialEq for ChatDelta
Auto Trait Implementations§
impl Forget for ChatDelta
impl Freeze for ChatDeltawhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<FailedModel>: Freeze,
impl Move for ChatDelta
impl RefUnwindSafe for ChatDelta
impl Send for ChatDelta
impl Sync for ChatDelta
impl Unpin for ChatDelta
impl UnsafeUnpin for ChatDeltawhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<FailedModel>: UnsafeUnpin,
impl UnwindSafe for ChatDelta
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