pub enum SessionPhase {
Disconnected,
Connecting,
SetupSent,
Active,
UserSpeaking,
ModelSpeaking,
Interrupted,
ToolCallPending,
ToolCallExecuting,
Disconnecting,
}Expand description
The lifecycle phase of a Gemini Live session.
Variants§
Disconnected
Not connected to the server.
Connecting
WebSocket connection in progress.
SetupSent
Setup message sent, awaiting setupComplete.
Active
Session is active and ready for interaction.
UserSpeaking
User is currently speaking (client VAD or server signal).
ModelSpeaking
Model is currently generating a response.
Interrupted
Model was interrupted by user barge-in.
ToolCallPending
Model requested tool calls, awaiting dispatch.
ToolCallExecuting
Tool calls are executing.
Disconnecting
Session is shutting down gracefully.
Implementations§
Source§impl SessionPhase
impl SessionPhase
Sourcepub fn can_transition_to(&self, to: &SessionPhase) -> bool
pub fn can_transition_to(&self, to: &SessionPhase) -> bool
Check whether a transition from this phase to to is valid.
Trait Implementations§
Source§impl Clone for SessionPhase
impl Clone for SessionPhase
Source§fn clone(&self) -> SessionPhase
fn clone(&self) -> SessionPhase
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 SessionPhase
impl Debug for SessionPhase
Source§impl Display for SessionPhase
impl Display for SessionPhase
Source§impl Hash for SessionPhase
impl Hash for SessionPhase
Source§impl PartialEq for SessionPhase
impl PartialEq for SessionPhase
impl Copy for SessionPhase
impl Eq for SessionPhase
impl StructuralPartialEq for SessionPhase
Auto Trait Implementations§
impl Freeze for SessionPhase
impl RefUnwindSafe for SessionPhase
impl Send for SessionPhase
impl Sync for SessionPhase
impl Unpin for SessionPhase
impl UnwindSafe for SessionPhase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.