#[non_exhaustive]pub enum KnownStreamEvent {
MessageStart {
message: Box<CreateMessageStartBody>,
extra: JsonObject,
},
ContentBlockStart {
index: u64,
content_block: Box<ContentBlock>,
extra: JsonObject,
},
ContentBlockDelta {
index: u64,
delta: Box<EventDelta>,
extra: JsonObject,
},
ContentBlockStop {
index: u64,
extra: JsonObject,
},
MessageDelta {
context_management: Option<Box<ContextManagementResponse>>,
delta: Box<MessageDelta>,
usage: Option<Box<Usage>>,
extra: JsonObject,
},
MessageStop {
extra: JsonObject,
},
Ping {
extra: JsonObject,
},
Error {
error: StreamError,
extra: JsonObject,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MessageStart
ContentBlockStart
ContentBlockDelta
ContentBlockStop
MessageDelta
Fields
§
context_management: Option<Box<ContextManagementResponse>>§
delta: Box<MessageDelta>§
extra: JsonObjectMessageStop
Fields
§
extra: JsonObjectPing
Fields
§
extra: JsonObjectError
Implementations§
Source§impl KnownStreamEvent
impl KnownStreamEvent
Sourcepub fn event_name(&self) -> &'static str
pub fn event_name(&self) -> &'static str
SSE event name: the exact serde rename of this variant.
Trait Implementations§
Source§impl Clone for KnownStreamEvent
impl Clone for KnownStreamEvent
Source§fn clone(&self) -> KnownStreamEvent
fn clone(&self) -> KnownStreamEvent
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 KnownStreamEvent
impl Debug for KnownStreamEvent
Source§impl<'de> Deserialize<'de> for KnownStreamEvent
impl<'de> Deserialize<'de> for KnownStreamEvent
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
Source§impl PartialEq for KnownStreamEvent
impl PartialEq for KnownStreamEvent
Source§impl Serialize for KnownStreamEvent
impl Serialize for KnownStreamEvent
impl StructuralPartialEq for KnownStreamEvent
Auto Trait Implementations§
impl Freeze for KnownStreamEvent
impl RefUnwindSafe for KnownStreamEvent
impl Send for KnownStreamEvent
impl Sync for KnownStreamEvent
impl Unpin for KnownStreamEvent
impl UnsafeUnpin for KnownStreamEvent
impl UnwindSafe for KnownStreamEvent
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