#[non_exhaustive]pub enum NadaError {
FormatMismatch {
expected: String,
actual: String,
},
LengthMismatch {
expected: usize,
actual: usize,
},
InvalidSampleRate(u32),
InvalidChannels(u32),
Dsp(String),
Capture(String),
InvalidParameter {
name: String,
value: String,
reason: String,
},
Conversion(String),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Errors that can occur during dhvani audio operations.
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.
FormatMismatch
Buffer format (sample rate, channels) doesn’t match expected.
LengthMismatch
Buffer sample count doesn’t match expected.
InvalidSampleRate(u32)
Sample rate is zero or out of supported range.
InvalidChannels(u32)
Channel count is zero or exceeds maximum.
Dsp(String)
DSP processing error.
Capture(String)
Audio capture/output error.
InvalidParameter
A parameter value is out of valid range.
Fields
Conversion(String)
Format conversion error.
Other(Box<dyn Error + Send + Sync>)
Wrapped external error.
Trait Implementations§
Source§impl Error for NadaError
impl Error for NadaError
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()
Auto Trait Implementations§
impl Freeze for NadaError
impl !RefUnwindSafe for NadaError
impl Send for NadaError
impl Sync for NadaError
impl Unpin for NadaError
impl UnsafeUnpin for NadaError
impl !UnwindSafe for NadaError
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