#[non_exhaustive]pub enum JpxError {
Format(&'static str),
Truncated,
Unsupported(&'static str),
Limit(&'static str),
Usage(&'static str),
}Expand description
Everything that can go wrong decoding a JPEG 2000 image.
Malformed input always surfaces as one of these; it never panics.
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.
Format(&'static str)
The file is malformed.
Truncated
The data ends before the image is complete. With
DecodeOptions::allow_truncated
the decoder returns what it has instead.
Unsupported(&'static str)
Well formed, but uses something this crate does not decode.
Limit(&'static str)
Decoding would exceed a Limits value.
Usage(&'static str)
The options do not fit the image (a reduce larger than the number of
decomposition levels).
Trait Implementations§
impl Eq for JpxError
Source§impl Error for JpxError
impl Error for JpxError
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()
impl StructuralPartialEq for JpxError
Auto Trait Implementations§
impl Forget for JpxError
impl Freeze for JpxError
impl Move for JpxError
impl RefUnwindSafe for JpxError
impl Send for JpxError
impl Sync for JpxError
impl Unpin for JpxError
impl UnsafeUnpin for JpxError
impl UnwindSafe for JpxError
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