pub struct WsVoiceEventSink {
pub channel: Arc<WsChannel>,
}Expand description
Voice event sink that forwards events to a specific WebSocket client
as voice.event JSON-RPC notifications.
Each voice.transcribe_stream.start call constructs one of these
bound to the originating client’s WsChannel, so a client only
receives events for sessions it started.
Fields§
§channel: Arc<WsChannel>Trait Implementations§
Source§impl VoiceEventSink for WsVoiceEventSink
impl VoiceEventSink for WsVoiceEventSink
Source§fn send(&self, session_id: &str, event_json: String)
fn send(&self, session_id: &str, event_json: String)
Deliver an event JSON payload tagged with the originating session id.
Source§fn send_binary(&self, frame: Vec<u8>)
fn send_binary(&self, frame: Vec<u8>)
Optional binary frame emission for sinks that have a wire-binary
channel (e.g. the WebSocket session). In-process sinks (NAPI /
PyO3 callbacks) don’t have an equivalent and use the default
no-op. The default no-op also means existing impls stay binary-
compatible — adding a new variant doesn’t require touching every
concrete sink. Read more
Auto Trait Implementations§
impl Freeze for WsVoiceEventSink
impl !RefUnwindSafe for WsVoiceEventSink
impl Send for WsVoiceEventSink
impl Sync for WsVoiceEventSink
impl Unpin for WsVoiceEventSink
impl UnsafeUnpin for WsVoiceEventSink
impl !UnwindSafe for WsVoiceEventSink
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 more