pub enum BlockDelta {
Text(String),
Thinking(String),
InputJson(String),
Other,
}Expand description
The incremental payload carried by a PartialMessageEvent::BlockDelta.
Mirrors the delta.type field from the Anthropic streaming API.
Less-common delta kinds (signature, citations, compaction, …) collapse to
BlockDelta::Other; callers that need them can fall back to
StreamEvent::data.
Variants§
Text(String)
Chunk of assistant text.
Thinking(String)
Chunk of extended-thinking text.
InputJson(String)
Chunk of streaming tool-input JSON. Concatenate across deltas to reconstruct the full input – individual chunks are not standalone JSON.
Other
Any delta type not modelled above (e.g. signature_delta,
citations_delta). Read from StreamEvent::data for the raw payload.
Trait Implementations§
Source§impl Clone for BlockDelta
impl Clone for BlockDelta
Source§fn clone(&self) -> BlockDelta
fn clone(&self) -> BlockDelta
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 BlockDelta
impl Debug for BlockDelta
impl Eq for BlockDelta
Source§impl PartialEq for BlockDelta
impl PartialEq for BlockDelta
Source§fn eq(&self, other: &BlockDelta) -> bool
fn eq(&self, other: &BlockDelta) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BlockDelta
Auto Trait Implementations§
impl Freeze for BlockDelta
impl RefUnwindSafe for BlockDelta
impl Send for BlockDelta
impl Sync for BlockDelta
impl Unpin for BlockDelta
impl UnsafeUnpin for BlockDelta
impl UnwindSafe for BlockDelta
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