#[non_exhaustive]pub enum Error {
Show 18 variants
Io(Error),
NotRiff {
found: [u8; 4],
},
TruncatedHeader {
offset: u64,
available: u64,
},
Truncated {
id: Fourcc,
declared: u64,
available: u64,
},
ChildExceedsParent {
id: Fourcc,
declared: u64,
remaining: u64,
},
MissingPad {
id: Fourcc,
offset: u64,
},
ListTooShort {
id: Fourcc,
size: u64,
},
TooDeep {
max: usize,
},
MissingDs64 {
found: Fourcc,
},
BadDs64 {
size: u64,
},
UnresolvedSize {
id: Fourcc,
},
NotAList {
id: Fourcc,
},
NotInList,
NoOpenChunk,
BufferTooSmall {
needed: u64,
},
TooLarge {
size: u64,
},
Unbalanced {
open: usize,
},
Unsupported(Feature),
}Expand description
An error from parsing, streaming, or writing a container.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The underlying stream returned an error.
NotRiff
The first four bytes do not identify a supported form.
TruncatedHeader
Fewer than eight bytes remain for a chunk header, or fewer than twelve bytes remain for the file header.
Fields
Truncated
A chunk payload ends before its declared size.
Fields
ChildExceedsParent
A child chunk extends beyond its list.
Fields
MissingPad
An odd payload reaches the input end without a pad byte.
Fields
ListTooShort
A list payload has no complete four-byte list type.
TooDeep
List nesting reached the fixed limit.
MissingDs64
An RF64 or BW64 file does not start with a size table.
BadDs64
The RF64 size table is too short for its declared entries.
UnresolvedSize
A sentinel size has no matching 64-bit value.
NotAList
A list-only operation received another chunk type.
NotInList
A list-leave operation was requested at the top level.
NoOpenChunk
A streaming write was requested without an open chunk.
BufferTooSmall
The caller’s payload buffer cannot hold the remaining bytes.
TooLarge
A size cannot fit in a 32-bit container field.
Unbalanced
The writer has open chunks or lists.
Unsupported(Feature)
The requested feature is unavailable.
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()