#[non_exhaustive]pub enum BuiltinDeserializationErrorKind {
Show 14 variants
BadDate {
date_field: &'static str,
err: LowLevelDeserializationError,
},
BadDecimalScale(LowLevelDeserializationError),
RawCqlBytesReadError(LowLevelDeserializationError),
CustomTypeNotSupported(String),
ExpectedNonNull,
ByteLengthMismatch {
expected: usize,
got: usize,
},
ExpectedAscii,
InvalidUtf8(Utf8Error),
ValueOverflow,
BadInetLength {
got: usize,
},
SetOrListError(SetOrListDeserializationErrorKind),
MapError(MapDeserializationErrorKind),
TupleError(TupleDeserializationErrorKind),
UdtError(UdtDeserializationErrorKind),
}
Expand description
Describes why deserialization of some of the built-in types failed.
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.
BadDate
Failed to deserialize one of date’s fields.
BadDecimalScale(LowLevelDeserializationError)
Failed to deserialize decimal’s scale.
RawCqlBytesReadError(LowLevelDeserializationError)
Failed to deserialize raw bytes of cql value.
CustomTypeNotSupported(String)
Returned on attempt to deserialize a value of custom type.
ExpectedNonNull
Expected non-null value, got null.
ByteLengthMismatch
The length of read value in bytes is different than expected for the Rust type.
ExpectedAscii
Expected valid ASCII string.
InvalidUtf8(Utf8Error)
Invalid UTF-8 string.
ValueOverflow
The read value is out of range supported by the Rust type.
BadInetLength
The length of read value in bytes is not suitable for IP address.
SetOrListError(SetOrListDeserializationErrorKind)
A deserialization failure specific to a CQL set or list.
MapError(MapDeserializationErrorKind)
A deserialization failure specific to a CQL map.
TupleError(TupleDeserializationErrorKind)
A deserialization failure specific to a CQL tuple.
UdtError(UdtDeserializationErrorKind)
A deserialization failure specific to a CQL UDT.
Trait Implementations§
source§impl From<MapDeserializationErrorKind> for BuiltinDeserializationErrorKind
impl From<MapDeserializationErrorKind> for BuiltinDeserializationErrorKind
source§fn from(err: MapDeserializationErrorKind) -> BuiltinDeserializationErrorKind
fn from(err: MapDeserializationErrorKind) -> BuiltinDeserializationErrorKind
Converts to this type from the input type.
source§impl From<SetOrListDeserializationErrorKind> for BuiltinDeserializationErrorKind
impl From<SetOrListDeserializationErrorKind> for BuiltinDeserializationErrorKind
source§fn from(
err: SetOrListDeserializationErrorKind,
) -> BuiltinDeserializationErrorKind
fn from( err: SetOrListDeserializationErrorKind, ) -> BuiltinDeserializationErrorKind
Converts to this type from the input type.
source§impl From<TupleDeserializationErrorKind> for BuiltinDeserializationErrorKind
impl From<TupleDeserializationErrorKind> for BuiltinDeserializationErrorKind
source§fn from(err: TupleDeserializationErrorKind) -> BuiltinDeserializationErrorKind
fn from(err: TupleDeserializationErrorKind) -> BuiltinDeserializationErrorKind
Converts to this type from the input type.
source§impl From<UdtDeserializationErrorKind> for BuiltinDeserializationErrorKind
impl From<UdtDeserializationErrorKind> for BuiltinDeserializationErrorKind
source§fn from(err: UdtDeserializationErrorKind) -> BuiltinDeserializationErrorKind
fn from(err: UdtDeserializationErrorKind) -> BuiltinDeserializationErrorKind
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BuiltinDeserializationErrorKind
impl !RefUnwindSafe for BuiltinDeserializationErrorKind
impl Send for BuiltinDeserializationErrorKind
impl Sync for BuiltinDeserializationErrorKind
impl Unpin for BuiltinDeserializationErrorKind
impl !UnwindSafe for BuiltinDeserializationErrorKind
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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