pub enum PartialMessageEvent {
BlockStart {
index: u32,
block_type: BlockType,
},
BlockDelta {
index: u32,
delta: BlockDelta,
},
BlockStop {
index: u32,
},
}Expand description
A decoded partial-message event from a streaming claude call.
Surfaced by StreamEvent::partial_message when --include-partial-messages
is set. The three variants correspond to the Anthropic streaming content-block
lifecycle: a block starts, gets one or more deltas, then stops.
Variants§
BlockStart
A new content block is starting. block_type says what kind.
Fields
BlockDelta
Incremental content for an in-progress block.
Fields
§
index: u32Index of the block this delta applies to (matches a prior BlockStart).
§
delta: BlockDeltaThe incremental payload.
BlockStop
The block at index is complete.
Trait Implementations§
Source§impl Clone for PartialMessageEvent
impl Clone for PartialMessageEvent
Source§fn clone(&self) -> PartialMessageEvent
fn clone(&self) -> PartialMessageEvent
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 PartialMessageEvent
impl Debug for PartialMessageEvent
impl Eq for PartialMessageEvent
Source§impl PartialEq for PartialMessageEvent
impl PartialEq for PartialMessageEvent
Source§fn eq(&self, other: &PartialMessageEvent) -> bool
fn eq(&self, other: &PartialMessageEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PartialMessageEvent
Auto Trait Implementations§
impl Freeze for PartialMessageEvent
impl RefUnwindSafe for PartialMessageEvent
impl Send for PartialMessageEvent
impl Sync for PartialMessageEvent
impl Unpin for PartialMessageEvent
impl UnsafeUnpin for PartialMessageEvent
impl UnwindSafe for PartialMessageEvent
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