Struct cpal::SupportedStreamConfig
source · pub struct SupportedStreamConfig { /* private fields */ }
Expand description
Describes a single supported stream configuration, retrieved via either a
SupportedStreamConfigRange
instance or one of the
Device::default_input/output_config
methods.
Implementations§
source§impl SupportedStreamConfig
impl SupportedStreamConfig
pub fn new( channels: ChannelCount, sample_rate: SampleRate, buffer_size: SupportedBufferSize, sample_format: SampleFormat ) -> Self
pub fn channels(&self) -> ChannelCount
pub fn sample_rate(&self) -> SampleRate
pub fn buffer_size(&self) -> &SupportedBufferSize
pub fn sample_format(&self) -> SampleFormat
pub fn config(&self) -> StreamConfig
Trait Implementations§
source§impl Clone for SupportedStreamConfig
impl Clone for SupportedStreamConfig
source§fn clone(&self) -> SupportedStreamConfig
fn clone(&self) -> SupportedStreamConfig
Returns a copy of the value. Read more
1.0.0 · 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 SupportedStreamConfig
impl Debug for SupportedStreamConfig
source§impl From<SupportedStreamConfig> for StreamConfig
impl From<SupportedStreamConfig> for StreamConfig
source§fn from(conf: SupportedStreamConfig) -> Self
fn from(conf: SupportedStreamConfig) -> Self
Converts to this type from the input type.
source§impl PartialEq for SupportedStreamConfig
impl PartialEq for SupportedStreamConfig
source§fn eq(&self, other: &SupportedStreamConfig) -> bool
fn eq(&self, other: &SupportedStreamConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SupportedStreamConfig
impl StructuralEq for SupportedStreamConfig
impl StructuralPartialEq for SupportedStreamConfig
Auto Trait Implementations§
impl RefUnwindSafe for SupportedStreamConfig
impl Send for SupportedStreamConfig
impl Sync for SupportedStreamConfig
impl Unpin for SupportedStreamConfig
impl UnwindSafe for SupportedStreamConfig
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