pub enum AnthropicStreamEvent {
MessageStart {
message: AnthropicMessageResponse,
},
ContentBlockStart {
index: u32,
content_block: AnthropicResponseContentBlock,
},
ContentBlockDelta {
index: u32,
delta: AnthropicDelta,
},
ContentBlockStop {
index: u32,
},
MessageDelta {
delta: AnthropicMessageDeltaBody,
usage: AnthropicUsage,
},
MessageStop {},
Ping {},
Error {
error: AnthropicErrorBody,
},
}Expand description
SSE event types for the Anthropic streaming API.
Variants§
MessageStart
Fields
§
message: AnthropicMessageResponseContentBlockStart
ContentBlockDelta
ContentBlockStop
MessageDelta
MessageStop
Ping
Error
Fields
§
error: AnthropicErrorBodyTrait Implementations§
Source§impl Clone for AnthropicStreamEvent
impl Clone for AnthropicStreamEvent
Source§fn clone(&self) -> AnthropicStreamEvent
fn clone(&self) -> AnthropicStreamEvent
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 AnthropicStreamEvent
impl Debug for AnthropicStreamEvent
Source§impl<'de> Deserialize<'de> for AnthropicStreamEvent
impl<'de> Deserialize<'de> for AnthropicStreamEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnthropicStreamEvent
impl RefUnwindSafe for AnthropicStreamEvent
impl Send for AnthropicStreamEvent
impl Sync for AnthropicStreamEvent
impl Unpin for AnthropicStreamEvent
impl UnsafeUnpin for AnthropicStreamEvent
impl UnwindSafe for AnthropicStreamEvent
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