pub enum StreamEvent {
TextDelta(String),
Done(ModelResponse),
Switched(ProviderSwitch),
}Expand description
One item of a streamed reply. A well-formed stream yields any number of
deltas and ends with exactly one Done carrying the complete response.
Variants§
TextDelta(String)
Visible text as it is generated.
Done(ModelResponse)
The full reply, with tool calls and usage.
Switched(ProviderSwitch)
A crate::Failover chain gave up on one provider and is trying
the next. Comes before any text of the reply.
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§impl Debug for StreamEvent
impl Debug for StreamEvent
Source§impl PartialEq for StreamEvent
impl PartialEq for StreamEvent
impl StructuralPartialEq for StreamEvent
Auto Trait Implementations§
impl Forget for StreamEvent
impl Freeze for StreamEvent
impl Move for StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ToolCall>: UnsafeUnpin,
impl UnwindSafe for StreamEvent
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