pub struct SessionInputHandle { /* private fields */ }Expand description
Handle for sending input to a voice session.
When this handle is dropped, the session will terminate normally.
Implementations§
Source§impl SessionInputHandle
impl SessionInputHandle
Sourcepub async fn send_audio(&self, data: Vec<u8>) -> Result<()>
pub async fn send_audio(&self, data: Vec<u8>) -> Result<()>
Send encoded audio data to the session.
The audio should be encoded in the format specified when starting the session. This method will block if the channel is full (backpressure).
Sourcepub async fn send_config(&self, config: SessionConfig) -> Result<()>
pub async fn send_config(&self, config: SessionConfig) -> Result<()>
Send or update the session configuration.
Must be called before sending audio if no initial_config was provided
to start_session.
Trait Implementations§
Source§impl Drop for SessionInputHandle
impl Drop for SessionInputHandle
Auto Trait Implementations§
impl Freeze for SessionInputHandle
impl RefUnwindSafe for SessionInputHandle
impl Send for SessionInputHandle
impl Sync for SessionInputHandle
impl Unpin for SessionInputHandle
impl UnsafeUnpin for SessionInputHandle
impl UnwindSafe for SessionInputHandle
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