pub enum PngDecodeErrors {
BadSignature,
GenericStatic(&'static str),
Generic(String),
BadCrc(u32, u32),
ZlibDecodeErrors(InflateDecodeErrors),
EmptyPalette,
UnsupportedAPNGImage,
TooSmallOutput(usize, usize),
}
Expand description
Errors possible during decoding
Variants§
BadSignature
Image signature is not png signature
GenericStatic(&'static str)
Generic message
Generic(String)
Generic message
BadCrc(u32, u32)
Calculated CRC does not match expected crc
ZlibDecodeErrors(InflateDecodeErrors)
error decoding zlib stream
EmptyPalette
Palette is empty yet was expected
UnsupportedAPNGImage
Unsupported Animated PNG
TooSmallOutput(usize, usize)
Too small output slice
Trait Implementations§
Source§impl Debug for PngDecodeErrors
impl Debug for PngDecodeErrors
Source§impl Display for PngDecodeErrors
impl Display for PngDecodeErrors
Source§impl Error for PngDecodeErrors
impl Error for PngDecodeErrors
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()
Source§impl From<&'static str> for PngDecodeErrors
impl From<&'static str> for PngDecodeErrors
Source§fn from(val: &'static str) -> PngDecodeErrors
fn from(val: &'static str) -> PngDecodeErrors
Converts to this type from the input type.
Source§impl From<InflateDecodeErrors> for PngDecodeErrors
impl From<InflateDecodeErrors> for PngDecodeErrors
Source§fn from(val: InflateDecodeErrors) -> PngDecodeErrors
fn from(val: InflateDecodeErrors) -> PngDecodeErrors
Converts to this type from the input type.
Source§impl From<PngDecodeErrors> for ImageError
impl From<PngDecodeErrors> for ImageError
Source§fn from(value: PngDecodeErrors) -> Self
fn from(value: PngDecodeErrors) -> Self
Converts to this type from the input type.
Source§impl From<String> for PngDecodeErrors
impl From<String> for PngDecodeErrors
Source§fn from(val: String) -> PngDecodeErrors
fn from(val: String) -> PngDecodeErrors
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PngDecodeErrors
impl RefUnwindSafe for PngDecodeErrors
impl Send for PngDecodeErrors
impl Sync for PngDecodeErrors
impl Unpin for PngDecodeErrors
impl UnwindSafe for PngDecodeErrors
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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