pub enum CompletionDelta {
Text(String),
Thinking(String),
ToolUseStart {
id: String,
name: String,
},
ToolArgs(String),
}Expand description
One incremental piece of a streaming completion (ADR-0021), normalized across
wires — the display-oriented side channel of crate::Provider::stream.
This is display-only: crate::Provider::stream still returns the same whole
Completion (assembled via ToolCallAssembler),
so tool dispatch and history are unaffected. The parts mirror what the wires
actually stream (text/reasoning on distinct channels; tool name/id early, args
as a raw partial-JSON channel that is never parsed here — see ADR-0021’s
granularity table).
Variants§
Text(String)
A fragment of assistant text.
Thinking(String)
A fragment of reasoning/thinking text (its own channel).
ToolUseStart
A tool call has started — name + id are known early (before args stream).
ToolArgs(String)
A raw partial-JSON fragment of the current tool call’s arguments. Not valid JSON in isolation — display-only; the call is assembled and parsed once at its finalize boundary.
Trait Implementations§
Source§impl Clone for CompletionDelta
impl Clone for CompletionDelta
Source§fn clone(&self) -> CompletionDelta
fn clone(&self) -> CompletionDelta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompletionDelta
impl Debug for CompletionDelta
impl Eq for CompletionDelta
Source§impl PartialEq for CompletionDelta
impl PartialEq for CompletionDelta
impl StructuralPartialEq for CompletionDelta
Auto Trait Implementations§
impl Freeze for CompletionDelta
impl RefUnwindSafe for CompletionDelta
impl Send for CompletionDelta
impl Sync for CompletionDelta
impl Unpin for CompletionDelta
impl UnsafeUnpin for CompletionDelta
impl UnwindSafe for CompletionDelta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.