#[non_exhaustive]pub enum ReadError {
Show 15 variants
Io(Error),
Decode(Error),
UnsupportedFormat,
NoTrack,
NoSampleRate,
NoChannels,
TooManyChannels(usize),
InvalidFrameRange {
start: usize,
end: usize,
},
InvalidStartChannel {
start: usize,
total: usize,
},
ZeroChannels,
InvalidChannelRange {
start: usize,
count: usize,
total: usize,
},
ChannelCountChanged {
expected: usize,
found: usize,
},
SampleRateChanged {
expected: u32,
found: u32,
},
MissingFrames {
start: u64,
end: u64,
},
Resample(ResampleError),
}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.
Io(Error)
Decode(Error)
A packet the decoder rejected. The file is damaged, truncated, or in an encoding this build cannot decode. Nothing is skipped over: a file that cannot be decoded in full is not read at all.
UnsupportedFormat
No decoder in this build can read the file. Only reachable without the
symphonia feature, where the built-in wav decoder is the whole reader
and everything it does not recognize has nowhere left to go.
NoTrack
NoSampleRate
NoChannels
TooManyChannels(usize)
InvalidFrameRange
InvalidStartChannel
ZeroChannels
InvalidChannelRange
ChannelCountChanged
SampleRateChanged
MissingFrames
Frames the stream never delivered, which the read cannot leave out without moving every later frame off the position it was asked for.
Resample(ResampleError)
Trait Implementations§
Source§impl Error for ReadError
impl Error for ReadError
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 From<ResampleError> for ReadError
impl From<ResampleError> for ReadError
Source§fn from(source: ResampleError) -> Self
fn from(source: ResampleError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ReadError
impl !UnwindSafe for ReadError
impl Freeze for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadError
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