pub enum ProviderEvent {
MessageStart,
TextDelta(String),
ThinkingDelta(String),
ToolCall(ToolCall),
MessageStop {
stop_reason: StopReason,
usage: Option<TokenUsage>,
model: Option<String>,
},
}Expand description
One unit of incremental output from a streaming completion.
Variants§
MessageStart
Marker emitted before any content.
TextDelta(String)
Incremental text chunk to append to the in-flight assistant message.
ThinkingDelta(String)
Incremental reasoning chunk from a thinking-capable model.
ToolCall(ToolCall)
Fully-assembled tool call from the assistant (providers buffer streamed JSON internally).
MessageStop
Final marker carrying the stop reason and (optional) usage.
Trait Implementations§
Source§impl Clone for ProviderEvent
impl Clone for ProviderEvent
Source§fn clone(&self) -> ProviderEvent
fn clone(&self) -> ProviderEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 ProviderEvent
impl Debug for ProviderEvent
Source§impl<'de> Deserialize<'de> for ProviderEvent
impl<'de> Deserialize<'de> for ProviderEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProviderEvent
impl RefUnwindSafe for ProviderEvent
impl Send for ProviderEvent
impl Sync for ProviderEvent
impl Unpin for ProviderEvent
impl UnsafeUnpin for ProviderEvent
impl UnwindSafe for ProviderEvent
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