#[non_exhaustive]pub enum Error {
Truncated(&'static str),
Malformed(&'static str),
Unsupported(&'static str),
MissingBox(&'static str),
MissingItem(u32),
MissingParameterSet(&'static str),
CyclicDerivation(u32),
PixelLimit {
pixels: u64,
max_pixels: u64,
},
Io(ErrorKind),
BoxTooLarge {
boxtype: [u8; 4],
size: u64,
},
}Expand description
Everything that can go wrong while reading a HEIF file.
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.
Truncated(&'static str)
The file ended in the middle of a structure that was still being read.
Malformed(&'static str)
A structure was present but its contents violate the format.
Unsupported(&'static str)
The file is well formed but asks for something this build cannot do.
MissingBox(&'static str)
A box required to make sense of the file is absent.
MissingItem(u32)
An item id referenced from elsewhere does not exist.
MissingParameterSet(&'static str)
A coded slice named a VPS, SPS or PPS the hvcC record did not carry.
CyclicDerivation(u32)
A dimg derivation chain refers back to itself.
PixelLimit
The declared image is larger than DecodeOptions::max_pixels.
Io(ErrorKind)
Available on crate feature
std only.A filesystem failure from the io module. Never produced by the
decoding path, which performs no I/O.
BoxTooLarge
A box declared a size that cannot be honoured on this machine.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.1.30.0 · 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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more