#[non_exhaustive]pub enum DecodeError {
Malformed(MalformedError),
Unsupported(UnsupportedFeature),
LimitExceeded(LimitExceeded),
Allocation {
requested_bytes: u64,
},
Io(IoErrorKind),
}Expand description
Error returned by parsing and decoding operations.
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.
Malformed(MalformedError)
The input violates the JBIG2 syntax or semantics.
Unsupported(UnsupportedFeature)
The input uses valid syntax outside the supported profile.
LimitExceeded(LimitExceeded)
An explicit resource limit was exceeded.
Allocation
A fallible allocation could not reserve the requested storage.
Io(IoErrorKind)
Reading from an input source failed.
Trait Implementations§
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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<Error> for DecodeError
impl From<Error> for DecodeError
Source§impl From<LimitExceeded> for DecodeError
impl From<LimitExceeded> for DecodeError
Source§fn from(error: LimitExceeded) -> Self
fn from(error: LimitExceeded) -> Self
Converts to this type from the input type.
Source§impl From<MalformedError> for DecodeError
impl From<MalformedError> for DecodeError
Source§fn from(error: MalformedError) -> Self
fn from(error: MalformedError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for DecodeError
impl Freeze for DecodeError
impl Move for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeErrorwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for DecodeErrorwhere
&'static str: UnwindSafe,
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