pub struct VoiceTurnHandle {
pub control: VoiceTurnControl,
pub fast: Receiver<StreamEvent>,
pub sidecar: Receiver<Result<SidecarResult, VoiceTurnError>>,
}Expand description
Two-track handle returned by dispatch_voice_turn.
fast streams StreamEvents for the fast track (text deltas,
tool-call markers, usage, done). sidecar resolves once with the
substantive answer or an error. control is a cheap clonable
surface that can be cached by the orchestrator for cancellation
from another task.
Caller MUST drive both receivers. Dropping fast cancels the fast
task; dropping sidecar cancels the sidecar task. To cancel both
without driving them, call Self::cancel (or
VoiceTurnControl::cancel on a stored clone).
Fields§
§control: VoiceTurnControl§fast: Receiver<StreamEvent>§sidecar: Receiver<Result<SidecarResult, VoiceTurnError>>Implementations§
Auto Trait Implementations§
impl Freeze for VoiceTurnHandle
impl !RefUnwindSafe for VoiceTurnHandle
impl Send for VoiceTurnHandle
impl Sync for VoiceTurnHandle
impl Unpin for VoiceTurnHandle
impl UnsafeUnpin for VoiceTurnHandle
impl !UnwindSafe for VoiceTurnHandle
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> 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