pub enum StreamEvent {
ToolProjectionWarning {
provider: String,
omitted_tool_names: Vec<String>,
omitted_tool_count: usize,
},
MessageStart {
message: MessageResponse,
},
ContentBlockStart {
index: u32,
content_block: ContentBlockStart,
},
ContentBlockDelta {
index: u32,
delta: Delta,
},
ContentBlockStop {
index: u32,
},
MessageDelta {
delta: MessageDelta,
usage: Option<Usage>,
},
MessageStop,
Ping,
Error {
error: Value,
},
}Expand description
Streaming event types for SSE responses.
Variants§
ToolProjectionWarning
Local pre-stream receipt: the provider request was sent with a reduced tool surface. This is not provider SSE and must not count as content.
MessageStart
Fields
§
message: MessageResponseContentBlockStart
ContentBlockDelta
ContentBlockStop
MessageDelta
MessageStop
Ping
Error
Anthropic SSE error event (#3014).
Trait Implementations§
Source§impl Clone for StreamEvent
impl Clone for StreamEvent
Source§impl Debug for StreamEvent
impl Debug for StreamEvent
Source§impl<'de> Deserialize<'de> for StreamEvent
impl<'de> Deserialize<'de> for StreamEvent
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 StreamEvent
impl RefUnwindSafe for StreamEvent
impl Send for StreamEvent
impl Sync for StreamEvent
impl Unpin for StreamEvent
impl UnsafeUnpin for StreamEvent
impl UnwindSafe for StreamEvent
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