pub enum LinearQuantizeCodecError {
MismatchedEncodeDType {
configured: LinearQuantizeDType,
provided: AnyArrayDType,
},
NonFiniteData,
HeaderEncodeFailed {
source: LinearQuantizeHeaderError,
},
EncodedDataNotOneDimensional {
shape: Vec<usize>,
},
HeaderDecodeFailed {
source: LinearQuantizeHeaderError,
},
DecodeInvalidShapeHeader {
source: ShapeError,
},
InvalidEncodedDType {
dtype: AnyArrayDType,
},
MismatchedDecodeIntoDtype {
configured: LinearQuantizeDType,
provided: AnyArrayDType,
},
MismatchedDecodeIntoShape {
decoded: Vec<usize>,
provided: Vec<usize>,
},
}Expand description
Errors that may occur when applying the LinearQuantizeCodec.
Variants§
MismatchedEncodeDType
LinearQuantizeCodec cannot encode the provided dtype which differs
from the configured dtype
Fields
configured: LinearQuantizeDTypeDtype of the configured dtype
provided: AnyArrayDTypeDtype of the provided array from which the data is to be encoded
NonFiniteData
LinearQuantizeCodec does not support non-finite (infinite or NaN) floating
point data
HeaderEncodeFailed
LinearQuantizeCodec failed to encode the header
Fields
source: LinearQuantizeHeaderErrorOpaque source error
EncodedDataNotOneDimensional
LinearQuantizeCodec can only decode one-dimensional arrays but
received an array of a different shape
HeaderDecodeFailed
LinearQuantizeCodec failed to decode the header
Fields
source: LinearQuantizeHeaderErrorOpaque source error
DecodeInvalidShapeHeader
LinearQuantizeCodec decoded an invalid array shape header which does
not fit the decoded data
Fields
source: ShapeErrorSource error
InvalidEncodedDType
LinearQuantizeCodec cannot decode the provided dtype
Fields
dtype: AnyArrayDTypeDtype of the provided array from which the data is to be decoded
MismatchedDecodeIntoDtype
LinearQuantizeCodec cannot decode the provided dtype which differs
from the configured dtype
Fields
configured: LinearQuantizeDTypeDtype of the configured dtype
provided: AnyArrayDTypeDtype of the provided array into which the data is to be decoded
MismatchedDecodeIntoShape
LinearQuantizeCodec cannot decode the decoded array into the provided
array of a different shape
Trait Implementations§
Source§impl Debug for LinearQuantizeCodecError
impl Debug for LinearQuantizeCodecError
Source§impl Display for LinearQuantizeCodecError
impl Display for LinearQuantizeCodecError
Source§impl Error for LinearQuantizeCodecError
impl Error for LinearQuantizeCodecError
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<ShapeError> for LinearQuantizeCodecError
impl From<ShapeError> for LinearQuantizeCodecError
Source§fn from(source: ShapeError) -> Self
fn from(source: ShapeError) -> Self
Auto Trait Implementations§
impl Freeze for LinearQuantizeCodecError
impl RefUnwindSafe for LinearQuantizeCodecError
impl Send for LinearQuantizeCodecError
impl Sync for LinearQuantizeCodecError
impl Unpin for LinearQuantizeCodecError
impl UnwindSafe for LinearQuantizeCodecError
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