#[non_exhaustive]pub enum SamplesError {
Channels(u32),
Rate(u32),
PartialFrame {
samples: usize,
channels: u16,
},
}Expand description
Why Samples couldn’t be made.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Channels(u32)
A sound has one or two channels.
Rate(u32)
A rate of zero, or over Samples::MAX_RATE.
PartialFrame
Samples that don’t divide into frames.
Trait Implementations§
Source§impl Clone for SamplesError
impl Clone for SamplesError
Source§fn clone(&self) -> SamplesError
fn clone(&self) -> SamplesError
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 SamplesError
impl Debug for SamplesError
Source§impl Display for SamplesError
impl Display for SamplesError
impl Eq for SamplesError
Source§impl Error for SamplesError
impl Error for SamplesError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for SamplesError
impl PartialEq for SamplesError
impl StructuralPartialEq for SamplesError
Auto Trait Implementations§
impl Freeze for SamplesError
impl RefUnwindSafe for SamplesError
impl Send for SamplesError
impl Sync for SamplesError
impl Unpin for SamplesError
impl UnsafeUnpin for SamplesError
impl UnwindSafe for SamplesError
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