pub enum StreamDelta {
Text(String),
Thinking(String),
Sync,
}Expand description
Stable since 0.63.0
Typed incremental delta for [`AgentEvent::MessageUpdate`].
Replaces the former Option<String> which conflated text and thinking
deltas. Consumers can now distinguish what kind of content changed.
Variants§
Text(String)
Regular text output from the assistant.
Thinking(String)
Thinking/reasoning content from a reasoning model.
Sync
Non-text structural change (e.g. a tool call was finalized).
Consumers should re-render from message rather than appending.
Implementations§
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<'de> Deserialize<'de> for StreamDelta
impl<'de> Deserialize<'de> for StreamDelta
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamDelta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StreamDelta
impl Serialize for StreamDelta
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 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