pub struct CaptureHandle {
pub frames_rx: Receiver<Vec<f32>>,
pub info: CaptureInfo,
pub stream: CaptureKeepAlive,
}Expand description
Returned by capture_default_input / capture_input /
crate::audio::loopback::capture_loopback. Holds the receiver end of
the frames channel plus the live backend keep-alive. Call
CaptureHandle::split to hand the receiver to an async task while
keeping the keep-alive on the calling (Send-free) thread.
Fields§
§frames_rx: Receiver<Vec<f32>>§info: CaptureInfo§stream: CaptureKeepAliveImplementations§
Source§impl CaptureHandle
impl CaptureHandle
Sourcepub fn split(self) -> (Receiver<Vec<f32>>, CaptureInfo, CaptureKeepAlive)
pub fn split(self) -> (Receiver<Vec<f32>>, CaptureInfo, CaptureKeepAlive)
Consume the handle and split it into the Send parts (the receiver
and metadata) and the !Send keep-alive, which the caller must keep
alive on the current thread for capture to continue.
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureHandle
impl !Send for CaptureHandle
impl !Sync for CaptureHandle
impl !UnwindSafe for CaptureHandle
impl Freeze for CaptureHandle
impl Unpin for CaptureHandle
impl UnsafeUnpin for CaptureHandle
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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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