pub struct NoOpEventHandler;Available on crate feature
realtime only.Expand description
Default no-op event handler.
Trait Implementations§
Source§impl Clone for NoOpEventHandler
impl Clone for NoOpEventHandler
Source§fn clone(&self) -> NoOpEventHandler
fn clone(&self) -> NoOpEventHandler
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 NoOpEventHandler
impl Debug for NoOpEventHandler
Source§impl Default for NoOpEventHandler
impl Default for NoOpEventHandler
Source§fn default() -> NoOpEventHandler
fn default() -> NoOpEventHandler
Returns the “default value” for a type. Read more
Source§impl EventHandler for NoOpEventHandler
impl EventHandler for NoOpEventHandler
Source§fn on_audio<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_audio: &'life1 [u8],
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_audio<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_audio: &'life1 [u8],
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when an audio delta is received (raw PCM bytes).
Source§fn on_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_text: &'life1 str,
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_text: &'life1 str,
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when a text delta is received.
Source§fn on_transcript<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_transcript: &'life1 str,
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_transcript<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_transcript: &'life1 str,
_item_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called when a transcript delta is received.
Source§fn on_speech_started<'life0, 'async_trait>(
&'life0 self,
_audio_start_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_speech_started<'life0, 'async_trait>(
&'life0 self,
_audio_start_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called when speech is detected.
Source§fn on_speech_stopped<'life0, 'async_trait>(
&'life0 self,
_audio_end_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_speech_stopped<'life0, 'async_trait>(
&'life0 self,
_audio_end_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called when speech ends.
Source§fn on_response_done<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn on_response_done<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), RealtimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Called when a response completes.
Auto Trait Implementations§
impl Freeze for NoOpEventHandler
impl RefUnwindSafe for NoOpEventHandler
impl Send for NoOpEventHandler
impl Sync for NoOpEventHandler
impl Unpin for NoOpEventHandler
impl UnsafeUnpin for NoOpEventHandler
impl UnwindSafe for NoOpEventHandler
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,
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.