#[non_exhaustive]pub enum Error {
Show 19 variants
Io(Error),
Truncated {
at: u64,
needed: u64,
},
BoxSizeTooSmall {
kind: FourCc,
size: u64,
at: u64,
},
BoxExceedsFile {
kind: FourCc,
at: u64,
declared_end: u64,
file_len: u64,
},
ChildExceedsParent {
parent: FourCc,
child: FourCc,
at: u64,
},
ZeroSizeNested {
kind: FourCc,
at: u64,
},
NestingTooDeep {
depth: u8,
at: u64,
},
MissingBox {
kind: FourCc,
parent: Option<FourCc>,
},
DuplicateBox {
kind: FourCc,
parent: FourCc,
},
Malformed {
kind: FourCc,
reason: &'static str,
},
InvalidSampleTable {
track: TrackId,
reason: &'static str,
},
InvalidTimescale {
track: Option<TrackId>,
},
SampleOutOfFile {
track: TrackId,
index: u32,
offset: u64,
size: u32,
file_len: u64,
},
LimitExceeded {
limit: &'static str,
value: u64,
max: u64,
},
Unsupported(&'static str),
NoSuchTrack(TrackId),
NoSuchSample {
track: TrackId,
index: u32,
},
Atom(Error),
WriterState(&'static str),
}Expand description
Errors produced by parsing, sample reads, and writing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
An input or output operation failed.
Truncated
A header or fixed field ended early.
BoxSizeTooSmall
A box size is smaller than its header.
BoxExceedsFile
A top-level box extends beyond the stream.
Fields
ChildExceedsParent
A child box extends beyond its parent.
ZeroSizeNested
A nested box uses a zero size.
NestingTooDeep
Structural nesting exceeds the configured limit.
MissingBox
A required box is missing.
DuplicateBox
A box that must be unique appears more than once.
Malformed
A known box has invalid fields.
InvalidSampleTable
A sample table is inconsistent.
InvalidTimescale
A movie or media timescale is zero.
SampleOutOfFile
A sample points beyond the stream.
Fields
LimitExceeded
A configured resource limit was exceeded.
Unsupported(&'static str)
The file uses an unsupported feature.
NoSuchTrack(TrackId)
No track has the requested identifier.
NoSuchSample
The requested sample index is absent.
Atom(Error)
The box-layer dependency rejected data.
WriterState(&'static str)
A writer method was called in an invalid state.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()