pub enum ClientEvent {
SessionUpdate {
session: Value,
},
AudioDelta {
event_id: Option<String>,
audio: Vec<u8>,
format: Option<AudioFormat>,
},
InputAudioBufferCommit,
InputAudioBufferClear,
ConversationItemCreate {
item: Value,
},
ResponseCreate {
config: Option<Value>,
},
ResponseCancel,
Message {
role: String,
parts: Vec<Part>,
},
UpdateSession {
instructions: Option<String>,
tools: Option<Vec<ToolDefinition>>,
},
}realtime only.Expand description
Events sent from the client to the realtime server.
Variants§
SessionUpdate
Update session configuration.
AudioDelta
Append audio to the input buffer.
Fields
format: Option<AudioFormat>Audio format metadata for multi-format pipelines and debugging. Skipped during serialization — the server infers format from the session config.
InputAudioBufferCommit
Commit the current audio buffer (manual mode).
InputAudioBufferClear
Clear the audio input buffer.
ConversationItemCreate
Send a text message or tool response.
ResponseCreate
Trigger a response from the model.
ResponseCancel
Cancel/interrupt the current response.
Message
A standard message using adk_core’s native Role and Part types.
UpdateSession
Universal intent to update session configuration mid-flight.
This is treated as a runner/control-plane internal intent and should not be sent directly to providers without interception. By construction, it is explicitly untagged from serialization to guarantee it cannot leak onto the WebSocket wire.
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientEvent
impl Debug for ClientEvent
Source§impl<'de> Deserialize<'de> for ClientEvent
impl<'de> Deserialize<'de> for ClientEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ClientEvent
impl Serialize for ClientEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ClientEvent
impl RefUnwindSafe for ClientEvent
impl Send for ClientEvent
impl Sync for ClientEvent
impl Unpin for ClientEvent
impl UnsafeUnpin for ClientEvent
impl UnwindSafe for ClientEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request