pub enum ValueDeserializeError {
MismatchedType,
Custom(String),
}
Expand description
Errors that can occur when deserializing the AlgebraicValue
.
Variants§
MismatchedType
The input type does not match the target type.
Custom(String)
An unstructured error message.
Trait Implementations§
source§impl Debug for ValueDeserializeError
impl Debug for ValueDeserializeError
source§impl Error for ValueDeserializeError
impl Error for ValueDeserializeError
source§fn custom(msg: impl Display) -> Self
fn custom(msg: impl Display) -> Self
Raised when there is general error when deserializing a type.
source§fn invalid_product_length<'de, T: ProductVisitor<'de>>(
len: usize,
expected: &T
) -> Self
fn invalid_product_length<'de, T: ProductVisitor<'de>>( len: usize, expected: &T ) -> Self
The product length was not as promised.
source§fn missing_field<'de, T: ProductVisitor<'de>>(
index: usize,
field_name: Option<&str>,
prod: &T
) -> Self
fn missing_field<'de, T: ProductVisitor<'de>>( index: usize, field_name: Option<&str>, prod: &T ) -> Self
There was a missing field at
index
.source§fn duplicate_field<'de, T: ProductVisitor<'de>>(
index: usize,
field_name: Option<&str>,
prod: &T
) -> Self
fn duplicate_field<'de, T: ProductVisitor<'de>>( index: usize, field_name: Option<&str>, prod: &T ) -> Self
A field with
index
was specified more than once.source§fn unknown_field_name<'de, T: FieldNameVisitor<'de>>(
field_name: &str,
expected: &T
) -> Self
fn unknown_field_name<'de, T: FieldNameVisitor<'de>>( field_name: &str, expected: &T ) -> Self
A field with name
field_name
does not exist.source§fn unknown_variant_tag<'de, T: SumVisitor<'de>>(tag: u8, expected: &T) -> Self
fn unknown_variant_tag<'de, T: SumVisitor<'de>>(tag: u8, expected: &T) -> Self
The
tag
does not specify a variant of the sum type.source§fn unknown_variant_name<T: VariantVisitor>(name: &str, expected: &T) -> Self
fn unknown_variant_name<T: VariantVisitor>(name: &str, expected: &T) -> Self
The
name
is not that of a variant of the sum type.Auto Trait Implementations§
impl RefUnwindSafe for ValueDeserializeError
impl Send for ValueDeserializeError
impl Sync for ValueDeserializeError
impl Unpin for ValueDeserializeError
impl UnwindSafe for ValueDeserializeError
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