pub enum InteractionStreamEvent {
InteractionStart {
interaction: Option<Interaction>,
event_id: Option<String>,
},
InteractionComplete {
interaction: Option<Interaction>,
event_id: Option<String>,
},
InteractionStatusUpdate {
interaction_id: Option<String>,
status: Option<InteractionsStatus>,
event_id: Option<String>,
},
ContentStart {
index: Option<u32>,
content: Option<Content>,
event_id: Option<String>,
},
ContentDelta {
index: Option<u32>,
event_id: Option<String>,
delta: Option<Delta>,
},
ContentStop {
index: Option<u32>,
event_id: Option<String>,
},
Error {
error: Option<InteractionsError>,
event_id: Option<String>,
},
}Expand description
Server-Sent Event for Interactions API streaming See: https://ai.google.dev/api/interactions-api#streaming
Variants§
InteractionStart
Emitted when an interaction begins processing
Fields
§
interaction: Option<Interaction>The interaction object
InteractionComplete
Emitted when an interaction completes
Fields
§
interaction: Option<Interaction>The interaction object
InteractionStatusUpdate
Emitted when interaction status changes
Fields
§
status: Option<InteractionsStatus>The new status
ContentStart
Signals the beginning of a new content block
Fields
ContentDelta
Streams incremental content updates
Fields
ContentStop
Marks the end of a content block
Fields
Error
Error event
Trait Implementations§
Source§impl Clone for InteractionStreamEvent
impl Clone for InteractionStreamEvent
Source§fn clone(&self) -> InteractionStreamEvent
fn clone(&self) -> InteractionStreamEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 InteractionStreamEvent
impl Debug for InteractionStreamEvent
Source§impl<'de> Deserialize<'de> for InteractionStreamEvent
impl<'de> Deserialize<'de> for InteractionStreamEvent
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 InteractionStreamEvent
impl RefUnwindSafe for InteractionStreamEvent
impl Send for InteractionStreamEvent
impl Sync for InteractionStreamEvent
impl Unpin for InteractionStreamEvent
impl UnwindSafe for InteractionStreamEvent
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