Struct Configuration
pub struct Configuration {
pub sample_rate: u32,
pub channels: u8,
/* private fields */
}Expand description
Fixed-width device payload. Frames contain one sample per interleaved channel.
The format is stored as a byte so malformed command data cannot create an invalid Rust enum. Reserved bytes must be zero; there is no implicit padding.
Fields§
§sample_rate: u32§channels: u8Implementations§
§impl Configuration
impl Configuration
pub const fn new( sample_rate: u32, channels: u8, format: SampleFormat, ) -> Configuration
pub fn sample_format(&self) -> Result<SampleFormat, Kind>
pub fn validate(&self) -> Result<(), Kind>
pub fn frame_size(&self) -> Result<usize, Kind>
Trait Implementations§
§impl Clone for Configuration
impl Clone for Configuration
§fn clone(&self) -> Configuration
fn clone(&self) -> Configuration
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 more§impl Debug for Configuration
impl Debug for Configuration
§impl PartialEq for Configuration
impl PartialEq for Configuration
impl Copy for Configuration
impl Eq for Configuration
impl PlainData for Configuration
impl StructuralPartialEq for Configuration
Auto Trait Implementations§
impl Freeze for Configuration
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnsafeUnpin for Configuration
impl UnwindSafe for Configuration
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