#[non_exhaustive]pub enum ShravanError {
UnsupportedFormat,
InvalidHeader(String),
DecodeError(String),
EncodeError(String),
EndOfStream,
InvalidSampleRate(u32),
InvalidChannels(u16),
}Expand description
Errors produced by shravan codec 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.
UnsupportedFormat
The audio format is not supported.
InvalidHeader(String)
The file header is invalid or corrupt.
DecodeError(String)
An error occurred during decoding.
EncodeError(String)
An error occurred during encoding.
EndOfStream
Unexpected end of input data.
InvalidSampleRate(u32)
The sample rate is invalid or unsupported.
InvalidChannels(u16)
The channel count is invalid or unsupported.
Trait Implementations§
Source§impl Debug for ShravanError
impl Debug for ShravanError
Source§impl<'de> Deserialize<'de> for ShravanError
impl<'de> Deserialize<'de> for ShravanError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ShravanError
impl Display for ShravanError
Source§impl Error for ShravanError
impl Error for ShravanError
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 ShravanError
impl RefUnwindSafe for ShravanError
impl Send for ShravanError
impl Sync for ShravanError
impl Unpin for ShravanError
impl UnsafeUnpin for ShravanError
impl UnwindSafe for ShravanError
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