enum DecoderError {
NoEntries,
IcoEntryTooManyPlanesOrHotspot,
IcoEntryTooManyBitsPerPixelOrHotspot,
PngShorterThanHeader,
PngNotRgba,
InvalidDataSize,
ImageEntryDimensionMismatch {
format: IcoEntryImageFormat,
entry: (u16, u16),
image: (u32, u32),
},
}Expand description
Errors that can occur during decoding and parsing an ICO image or one of its enclosed images.
Variants§
NoEntries
The ICO directory is empty
IcoEntryTooManyPlanesOrHotspot
The number of color planes (0 or 1), or the horizontal coordinate of the hotspot for CUR files too big.
IcoEntryTooManyBitsPerPixelOrHotspot
The bit depth (may be 0 meaning unspecified), or the vertical coordinate of the hotspot for CUR files too big.
PngShorterThanHeader
The entry is in PNG format and specified a length that is shorter than PNG header.
PngNotRgba
The enclosed PNG is not in RGBA, which is invalid: https://blogs.msdn.microsoft.com/oldnewthing/20101022-00/?p=12473/.
InvalidDataSize
The entry is in BMP format and specified a data size that is not correct for the image and optional mask data.
ImageEntryDimensionMismatch
The dimensions specified by the entry does not match the dimensions in the header of the enclosed image.
Trait Implementations§
Source§impl Clone for DecoderError
impl Clone for DecoderError
Source§fn clone(&self) -> DecoderError
fn clone(&self) -> DecoderError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecoderError
impl Debug for DecoderError
Source§impl Display for DecoderError
impl Display for DecoderError
Source§impl Error for DecoderError
impl Error for DecoderError
1.30.0 · 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()
Source§impl From<DecoderError> for ImageError
impl From<DecoderError> for ImageError
Source§fn from(e: DecoderError) -> ImageError
fn from(e: DecoderError) -> ImageError
Source§impl Hash for DecoderError
impl Hash for DecoderError
Source§impl Ord for DecoderError
impl Ord for DecoderError
Source§fn cmp(&self, other: &DecoderError) -> Ordering
fn cmp(&self, other: &DecoderError) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DecoderError
impl PartialEq for DecoderError
Source§fn eq(&self, other: &DecoderError) -> bool
fn eq(&self, other: &DecoderError) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DecoderError
impl PartialOrd for DecoderError
impl Copy for DecoderError
impl Eq for DecoderError
impl StructuralPartialEq for DecoderError
Auto Trait Implementations§
impl Freeze for DecoderError
impl RefUnwindSafe for DecoderError
impl Send for DecoderError
impl Sync for DecoderError
impl Unpin for DecoderError
impl UnsafeUnpin for DecoderError
impl UnwindSafe for DecoderError
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
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>
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>
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