pub enum StreamingEvent {
MessageStart {
message: Option<MessageStart>,
},
ContentBlockStart {
index: usize,
content_block: Content,
},
ContentBlockDelta {
index: usize,
delta: ContentDelta,
},
ContentBlockStop {
index: usize,
},
MessageDelta {
delta: MessageDelta,
usage: PartialUsage,
},
MessageStop,
Ping,
Error {
error: Value,
},
}Variants§
MessageStart
Fields
§
message: Option<MessageStart>Anthropic-compatible relays (Bedrock’s Messages passthrough) can
emit message_start with a null message; None is a no-op
rather than a corrupt frame.
ContentBlockStart
ContentBlockDelta
ContentBlockStop
MessageDelta
MessageStop
Ping
Keep-alive; a Known no-op, not an unknown event to warn about.
Error
Anthropic’s top-level error envelope ({"type":"error","error":{...}},
e.g. overloaded_error). A modeled event, not an unknown to warn-skip:
it surfaces as a provider error like every other family’s error
envelope. The payload stays a raw Value so every provider field
(type, message, extras) survives into the error body.
Trait Implementations§
Source§impl Debug for StreamingEvent
impl Debug for StreamingEvent
Source§impl<'de> Deserialize<'de> for StreamingEvent
impl<'de> Deserialize<'de> for StreamingEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StreamingEvent
impl RefUnwindSafe for StreamingEvent
impl Send for StreamingEvent
impl Sync for StreamingEvent
impl Unpin for StreamingEvent
impl UnsafeUnpin for StreamingEvent
impl UnwindSafe for StreamingEvent
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