pub struct RealtimeVoiceBroker { /* private fields */ }Expand description
Long-lived broker that opens duplex realtime sessions against a
gateway. Reusable across many concurrent sessions; the
RealtimeSession returned by [connect] owns the socket
lifetime.
Implementations§
Source§impl RealtimeVoiceBroker
impl RealtimeVoiceBroker
pub fn new( model: impl Into<String>, gateway: Arc<dyn RealtimeVoiceGateway>, config: RealtimeVoiceConfig, tracer: Option<Arc<TracerSystem>>, tool_runner: Option<Arc<dyn ToolRunner>>, ) -> Self
Sourcepub async fn connect(&self) -> Result<RealtimeSession, TransportError>
pub async fn connect(&self) -> Result<RealtimeSession, TransportError>
Open a new realtime session.
Returns the session handle ready to drive: text in / events out
flow through it. The initial session.update is sent in the
background by the session driver before the first event lands.
Auto Trait Implementations§
impl !RefUnwindSafe for RealtimeVoiceBroker
impl !UnwindSafe for RealtimeVoiceBroker
impl Freeze for RealtimeVoiceBroker
impl Send for RealtimeVoiceBroker
impl Sync for RealtimeVoiceBroker
impl Unpin for RealtimeVoiceBroker
impl UnsafeUnpin for RealtimeVoiceBroker
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