pub struct SerializationError(/* private fields */);
Expand description
An error indicating that a failure happened during serialization.
The error is type-erased so that the crate users can define their own serialization impls and their errors. As for the impls defined or generated by the driver itself, the following errors can be returned:
row::BuiltinSerializationError
is returned when serialization of one of types with an impl built into the driver fails. It is also returned from impls generated by theSerializeRow
macro.value::BuiltinSerializationError
is analogous to the above but is returned fromSerializeCql::serialize
instead both in the case of builtin impls and impls generated by theSerializeCql
macro. It won’t be returned by theSession
directly, but it might be nested in therow::BuiltinSerializationError
.row::ValueListToSerializeRowAdapterError
is returned in case when a list of named values encoded with the legacyValueList
trait is passed as an argument to the statement, and rewriting it using the newSerializeRow
interface fails.
Implementations§
Trait Implementations§
Source§impl Clone for SerializationError
impl Clone for SerializationError
Source§fn clone(&self) -> SerializationError
fn clone(&self) -> SerializationError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SerializationError
impl Debug for SerializationError
Source§impl Display for SerializationError
impl Display for SerializationError
Source§impl Error for SerializationError
impl Error for SerializationError
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()
Source§impl From<SerializationError> for BadQuery
impl From<SerializationError> for BadQuery
Source§fn from(source: SerializationError) -> BadQuery
fn from(source: SerializationError) -> BadQuery
Converts to this type from the input type.
Source§impl From<SerializationError> for ParseError
impl From<SerializationError> for ParseError
Source§fn from(source: SerializationError) -> ParseError
fn from(source: SerializationError) -> ParseError
Converts to this type from the input type.
Source§impl From<SerializationError> for PartitionKeyError
impl From<SerializationError> for PartitionKeyError
Source§fn from(err: SerializationError) -> Self
fn from(err: SerializationError) -> Self
Converts to this type from the input type.
Source§impl From<SerializationError> for QueryError
impl From<SerializationError> for QueryError
Source§fn from(serialized_err: SerializationError) -> QueryError
fn from(serialized_err: SerializationError) -> QueryError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SerializationError
impl !RefUnwindSafe for SerializationError
impl Send for SerializationError
impl Sync for SerializationError
impl Unpin for SerializationError
impl !UnwindSafe for SerializationError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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