pub enum DecodeError {
NoDecoder,
Unsupported(Vec<Declined>),
InvalidData(String),
LimitExceeded(&'static str),
Failed(String),
Image(ImageError),
Closed,
}Expand description
DecodeError is why a decode did not produce an image.
Variants§
NoDecoder
NoDecoder means the loader was built with no decoders at all.
Unsupported(Vec<Declined>)
Unsupported means every decoder declined the bytes; each entry says why.
InvalidData(String)
InvalidData means a decoder recognised the format and found the bytes damaged.
LimitExceeded(&'static str)
LimitExceeded means a DecodeLimits bound was hit; the text names
which one.
Failed(String)
Failed means a decoder or the platform failed without proving the bytes invalid — an allocation failure, a system API declining.
Image(ImageError)
Image means the decoded frame could not become an image on this device.
Closed
Closed means the loader was dropped before the work ran.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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<DecodeError> for OpenError
impl From<DecodeError> for OpenError
Source§fn from(error: DecodeError) -> Self
fn from(error: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<ImageError> for DecodeError
impl From<ImageError> for DecodeError
Source§fn from(error: ImageError) -> Self
fn from(error: ImageError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Freeze for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl UnwindSafe for DecodeError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.