#[non_exhaustive]pub enum HeicError {
InvalidContainer(&'static str),
InvalidData(&'static str),
Unsupported(&'static str),
NoPrimaryImage,
HevcDecode(HevcError),
BufferTooSmall {
required: usize,
actual: usize,
},
LimitExceeded(&'static str),
OutOfMemory,
Cancelled(StopReason),
Sink(Box<dyn Error + Send + Sync>),
UnsupportedCodec(&'static str),
}Expand description
Errors that can occur during HEIC decoding
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.
InvalidContainer(&'static str)
Invalid HEIF container structure
InvalidData(&'static str)
Invalid or corrupt data
Unsupported(&'static str)
Unsupported feature
NoPrimaryImage
No primary image found in container
HevcDecode(HevcError)
HEVC decoding error
BufferTooSmall
Buffer too small for decode_into
LimitExceeded(&'static str)
A resource limit was exceeded (dimensions, pixel count, or memory)
OutOfMemory
Memory allocation failed
Cancelled(StopReason)
Operation was cancelled via cooperative cancellation
Sink(Box<dyn Error + Send + Sync>)
A decode sink reported an error
UnsupportedCodec(&'static str)
Codec not supported (e.g., AV1 without the av1 feature, or JPEG, or H.264)
Trait Implementations§
Source§impl Error for HeicError
impl Error for HeicError
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<StopReason> for HeicError
impl From<StopReason> for HeicError
Source§fn from(r: StopReason) -> Self
fn from(r: StopReason) -> Self
Converts to this type from the input type.
Source§impl From<TryReserveError> for HeicError
impl From<TryReserveError> for HeicError
Source§fn from(_: TryReserveError) -> Self
fn from(_: TryReserveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HeicError
impl !RefUnwindSafe for HeicError
impl Send for HeicError
impl Sync for HeicError
impl Unpin for HeicError
impl UnsafeUnpin for HeicError
impl !UnwindSafe for HeicError
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