pub struct AudioStream<B>where
B: AudioStreamBackend,{ /* private fields */ }Expand description
Zero-cost static-dispatch core AudioStream<B> entity (0 vtable overhead, 0 steady-state
heap allocations on read_into).
Implementations§
Source§impl<B> AudioStream<B>where
B: OpenableStreamBackend,
impl<B> AudioStream<B>where
B: OpenableStreamBackend,
pub fn open( target: &CaptureTarget, overflow: Overflow, ) -> Result<AudioStream<B>, CapabilityError>
pub fn open_with_options( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, ) -> Result<AudioStream<B>, CapabilityError>
pub fn open_with_permission_policy( target: &CaptureTarget, tree_range: ProcessTreeRange, backends: &Backends, overflow: Overflow, timing: TimingRequirement, permission_policy: PermissionPolicy, ) -> Result<AudioStream<B>, CapabilityError>
Source§impl<B> AudioStream<B>where
B: AudioStreamBackend,
impl<B> AudioStream<B>where
B: AudioStreamBackend,
pub fn new(inner: B) -> AudioStream<B>
pub fn into_inner(self) -> B
pub fn backend(&self) -> &B
pub fn backend_mut(&mut self) -> &mut B
pub fn format(&self) -> &Arc<Format> ⓘ
pub fn trace(&self) -> Option<&Arc<Trace>>
pub fn control_handle(&self) -> ControlHandle
pub fn default_cancel(&self) -> Cancellation
pub fn end_reason(&self) -> Option<EndReason>
pub fn read( &mut self, frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>
pub fn read_with_cancel( &mut self, frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>
pub fn read_into( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, ) -> Result<ReadResult, ReadError>
pub fn read_into_with_cancel( &mut self, destination: &mut [u8], frames: usize, timeout: Duration, cancel: Cancellation, ) -> Result<ReadResult, ReadError>
pub fn stop(&self, mode: Stop)
pub fn resources_done(&self) -> bool
pub fn wait_cleanup(&self, timeout: Duration) -> bool
Auto Trait Implementations§
impl<B> Freeze for AudioStream<B>where
B: Freeze,
impl<B> RefUnwindSafe for AudioStream<B>where
B: RefUnwindSafe,
impl<B> Send for AudioStream<B>
impl<B> Sync for AudioStream<B>where
B: Sync,
impl<B> Unpin for AudioStream<B>where
B: Unpin,
impl<B> UnsafeUnpin for AudioStream<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for AudioStream<B>where
B: UnwindSafe,
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