pub enum Error {
Io(Error),
Format(&'static str),
Unsupported(&'static str),
TooWide,
UnfinishedFrame,
TooLarge,
}Expand description
Errors from reading or writing a WAV stream.
Variants§
Io(Error)
The underlying reader or writer failed.
Format(&'static str)
The container is malformed (or a writer spec would produce one).
Unsupported(&'static str)
The container is well formed but outside this crate’s scope.
TooWide
The sample type does not fit the file: too narrow to hold the file’s precision on read, the wrong class (integer against float) in either direction, a value outside the file’s range on write, or an integer writer spec wider than 32 bits at construction.
UnfinishedFrame
The writer was finalized in the middle of a frame. Explicit
WavWriter::finalize returns this. Drop runs the same patch and
discards the error.
TooLarge
The data chunk would exceed what the 32-bit size fields can hold.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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