pub enum CaptureKeepAlive {
Cpal(Stream),
}Expand description
Keep-alive handle for whatever backend is producing frames. The App
pins this to its owning thread (same as a bare cpal::Stream used to be)
and dropping it cleanly stops capture.
NOTE: intentionally NOT required to be Send. cpal::Stream is !Send,
so the whole enum is !Send by auto-trait inference, which matches what
the App expects. The macOS SCK variant’s underlying SCStream happens
to be Send by itself but we don’t rely on that.
Variants§
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureKeepAlive
impl !Send for CaptureKeepAlive
impl !Sync for CaptureKeepAlive
impl !UnwindSafe for CaptureKeepAlive
impl Freeze for CaptureKeepAlive
impl Unpin for CaptureKeepAlive
impl UnsafeUnpin for CaptureKeepAlive
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