pub struct GeminiLiveClient<S: Clone + Send + Sync + 'static> { /* private fields */ }
Implementations§
Source§impl<S: Clone + Send + Sync + 'static> GeminiLiveClient<S>
impl<S: Clone + Send + Sync + 'static> GeminiLiveClient<S>
pub async fn close(&mut self) -> Result<(), GeminiError>
pub fn get_outgoing_mpsc_sender_clone( &self, ) -> Option<Sender<ClientMessagePayload>>
pub fn builder_with_state( api_key: String, model: String, state: S, ) -> GeminiLiveClientBuilder<S>
pub async fn send_text_turn( &self, text: String, end_of_turn: bool, ) -> Result<(), GeminiError>
pub async fn send_audio_chunk( &self, audio_samples: &[i16], sample_rate: u32, channels: u16, ) -> Result<(), GeminiError>
pub async fn send_realtime_text(&self, text: String) -> Result<(), GeminiError>
pub async fn send_activity_start(&self) -> Result<(), GeminiError>
pub async fn send_activity_end(&self) -> Result<(), GeminiError>
pub async fn send_audio_stream_end(&self) -> Result<(), GeminiError>
pub fn state(&self) -> Arc<S>
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for GeminiLiveClient<S>
impl<S> !RefUnwindSafe for GeminiLiveClient<S>
impl<S> Send for GeminiLiveClient<S>
impl<S> Sync for GeminiLiveClient<S>
impl<S> Unpin for GeminiLiveClient<S>
impl<S> !UnwindSafe for GeminiLiveClient<S>
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