#[non_exhaustive]pub enum ModelDelta {
Text(String),
ToolCallStart {
id: String,
name: String,
},
ToolCallArgs {
id: String,
partial_json: String,
},
ToolCallEnd {
id: String,
},
Usage(Usage),
Stop(StopReason),
Reasoning(String),
}Expand description
Streaming delta — incremental output from the model.
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)
ToolCallStart
ToolCallArgs
ToolCallEnd
Usage(Usage)
Stop(StopReason)
Reasoning(String)
Provider-specific reasoning trace that must round-trip on the next
request. DeepSeek thinking content, Anthropic thinking blocks, and
Gemini raw parts (with thoughtSignatures) all flow through this —
the AgentLoop folds them into the final ModelOutput.reasoning
without surfacing them to user-visible token streams.
Trait Implementations§
Source§impl Clone for ModelDelta
impl Clone for ModelDelta
Source§fn clone(&self) -> ModelDelta
fn clone(&self) -> ModelDelta
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 ModelDelta
impl Debug for ModelDelta
Source§impl<'de> Deserialize<'de> for ModelDelta
impl<'de> Deserialize<'de> for ModelDelta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ModelDelta
impl Serialize for ModelDelta
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ModelDelta
impl RefUnwindSafe for ModelDelta
impl Send for ModelDelta
impl Sync for ModelDelta
impl Unpin for ModelDelta
impl UnsafeUnpin for ModelDelta
impl UnwindSafe for ModelDelta
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