pub enum Jpeg2000CodecError {
UnsupportedDtype(AnyArrayDType),
HeaderEncodeFailed {
source: Jpeg2000HeaderError,
},
Jpeg2000EncodeFailed {
source: Jpeg2000CodingError,
},
SliceEncodeFailed {
source: Jpeg2000SliceError,
},
EncodedDataNotBytes {
dtype: AnyArrayDType,
},
EncodedDataNotOneDimensional {
shape: Vec<usize>,
},
HeaderDecodeFailed {
source: Jpeg2000HeaderError,
},
SliceDecodeFailed {
source: Jpeg2000SliceError,
},
DecodeTooManySlices,
Jpeg2000DecodeFailed {
source: Jpeg2000CodingError,
},
DecodeInvalidShape {
source: ShapeError,
},
MismatchedDecodeIntoArray {
source: AnyArrayAssignError,
},
}Expand description
Errors that may occur when applying the Jpeg2000Codec.
Variants§
UnsupportedDtype(AnyArrayDType)
Jpeg2000Codec does not support the dtype
HeaderEncodeFailed
Jpeg2000Codec failed to encode the header
Fields
source: Jpeg2000HeaderErrorOpaque source error
Jpeg2000EncodeFailed
Jpeg2000Codec failed to encode the data
Fields
source: Jpeg2000CodingErrorOpaque source error
SliceEncodeFailed
Jpeg2000Codec failed to encode a slice
Fields
source: Jpeg2000SliceErrorOpaque source error
EncodedDataNotBytes
Jpeg2000Codec can only decode one-dimensional byte arrays but received
an array of a different dtype
Fields
dtype: AnyArrayDTypeThe unexpected dtype of the encoded array
EncodedDataNotOneDimensional
Jpeg2000Codec can only decode one-dimensional byte arrays but received
an array of a different shape
HeaderDecodeFailed
Jpeg2000Codec failed to decode the header
Fields
source: Jpeg2000HeaderErrorOpaque source error
SliceDecodeFailed
Jpeg2000Codec failed to decode a slice
Fields
source: Jpeg2000SliceErrorOpaque source error
DecodeTooManySlices
Jpeg2000Codec failed to decode from an excessive number of slices
Jpeg2000DecodeFailed
Jpeg2000Codec failed to decode the data
Fields
source: Jpeg2000CodingErrorOpaque source error
DecodeInvalidShape
Jpeg2000Codec decoded into an invalid shape not matching the data size
Fields
source: ShapeErrorThe source of the error
MismatchedDecodeIntoArray
Jpeg2000Codec cannot decode into the provided array
Fields
source: AnyArrayAssignErrorThe source of the error
Trait Implementations§
Source§impl Debug for Jpeg2000CodecError
impl Debug for Jpeg2000CodecError
Source§impl Display for Jpeg2000CodecError
impl Display for Jpeg2000CodecError
Source§impl Error for Jpeg2000CodecError
impl Error for Jpeg2000CodecError
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
Source§impl From<AnyArrayAssignError> for Jpeg2000CodecError
impl From<AnyArrayAssignError> for Jpeg2000CodecError
Source§fn from(source: AnyArrayAssignError) -> Self
fn from(source: AnyArrayAssignError) -> Self
Auto Trait Implementations§
impl Freeze for Jpeg2000CodecError
impl RefUnwindSafe for Jpeg2000CodecError
impl Send for Jpeg2000CodecError
impl Sync for Jpeg2000CodecError
impl Unpin for Jpeg2000CodecError
impl UnwindSafe for Jpeg2000CodecError
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> 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