pub enum Error {
InvalidData(&'static str),
Unsupported(&'static str),
UnsupportedDetail(Status, &'static str),
UnexpectedEOF,
Io(Error),
NoMoov,
OutOfMemory,
}
Expand description
Describes parser failures.
This enum wraps the standard io::Error
type, unified with
our own parser error states and those of crates we use.
Variants§
InvalidData(&'static str)
Parse error caused by corrupt or malformed data.
Unsupported(&'static str)
Parse error caused by limited parser support rather than invalid data.
UnsupportedDetail(Status, &'static str)
Similar to Self::Unsupported
, but for errors that have a specific
Status
variant for communicating the detail across FFI.
See the helper From<Status> for Error
UnexpectedEOF
Reflect std::io::ErrorKind::UnexpectedEof
for short data.
Io(Error)
Propagate underlying errors from std::io
.
NoMoov
read_mp4 terminated without detecting a moov box.
OutOfMemory
Out of memory
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<BitReaderError> for Error
impl From<BitReaderError> for Error
source§fn from(_: BitReaderError) -> Error
fn from(_: BitReaderError) -> Error
Converts to this type from the input type.
source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(_: FromUtf8Error) -> Error
fn from(_: FromUtf8Error) -> Error
Converts to this type from the input type.
source§impl From<Status> for Error
impl From<Status> for Error
For convenience of creating an error for an unsupported feature which we want to communicate the specific feature back to the C API caller
source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
source§fn from(_: TryFromIntError) -> Error
fn from(_: TryFromIntError) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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