pub enum StreamDirection {
Input,
Output,
}Expand description
The direction a stream carries audio.
Variants§
Input
A capture stream — audio flows from the device into the system (a virtual microphone).
Output
A playback stream — audio flows from the system into the device (a virtual speaker).
Implementations§
Source§impl StreamDirection
impl StreamDirection
Sourcepub const fn as_property_value(self) -> u32
pub const fn as_property_value(self) -> u32
The kAudioStreamPropertyDirection value the HAL expects:
1 for input, 0 for output.
Sourcepub const fn from_property_value(value: u32) -> Self
pub const fn from_property_value(value: u32) -> Self
Reconstruct a direction from a kAudioStreamPropertyDirection
value. Any non-zero value is treated as input, matching the
HAL’s boolean interpretation.
Sourcepub const fn scope(self) -> PropertyScope
pub const fn scope(self) -> PropertyScope
The PropertyScope a property access on this stream’s
direction is keyed to.
Trait Implementations§
Source§impl Clone for StreamDirection
impl Clone for StreamDirection
Source§fn clone(&self) -> StreamDirection
fn clone(&self) -> StreamDirection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamDirection
impl Debug for StreamDirection
Source§impl Hash for StreamDirection
impl Hash for StreamDirection
Source§impl PartialEq for StreamDirection
impl PartialEq for StreamDirection
Source§fn eq(&self, other: &StreamDirection) -> bool
fn eq(&self, other: &StreamDirection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for StreamDirection
impl Eq for StreamDirection
impl StructuralPartialEq for StreamDirection
Auto Trait Implementations§
impl Freeze for StreamDirection
impl RefUnwindSafe for StreamDirection
impl Send for StreamDirection
impl Sync for StreamDirection
impl Unpin for StreamDirection
impl UnsafeUnpin for StreamDirection
impl UnwindSafe for StreamDirection
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