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