pub enum StreamChunk {
Content(String),
Thinking(String),
Compaction(String),
ToolUse(Vec<ToolUseRequest>),
}Expand description
A chunk from an LLM streaming response.
Variants§
Content(String)
Regular response text.
Thinking(String)
Internal reasoning/thinking token (e.g. Claude extended thinking, OpenAI reasoning).
Compaction(String)
Server-side compaction summary (Claude compact-2026-01-12 beta). Delivered when the Claude API automatically summarizes conversation history.
ToolUse(Vec<ToolUseRequest>)
One or more tool calls from the model received during streaming.
Trait Implementations§
Source§impl Clone for StreamChunk
impl Clone for StreamChunk
Source§fn clone(&self) -> StreamChunk
fn clone(&self) -> StreamChunk
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 moreAuto Trait Implementations§
impl Freeze for StreamChunk
impl RefUnwindSafe for StreamChunk
impl Send for StreamChunk
impl Sync for StreamChunk
impl Unpin for StreamChunk
impl UnsafeUnpin for StreamChunk
impl UnwindSafe for StreamChunk
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