Enum serde::de::value::Error [] [src]

pub enum Error {
    Custom(String),
    InvalidType(Type),
    InvalidLength(usize),
    InvalidValue(String),
    EndOfStream,
    UnknownVariant(String),
    UnknownField(String),
    MissingField(&'static str),
}

This represents all the possible errors that can occur using the ValueDeserializer.

Variants

Custom

The value had some custom error.

InvalidType

The value had an incorrect type.

InvalidLength

The value had an invalid length.

InvalidValue

The value is invalid and cannot be deserialized.

EndOfStream

EOF while deserializing a value.

UnknownVariant

Unknown variant in enum.

UnknownField

Unknown field in struct.

MissingField

Struct is missing a field.

Trait Implementations

impl Error for Error

fn custom<T: Into<String>>(msg: T) -> Self

fn end_of_stream() -> Self

fn invalid_type(ty: Type) -> Self

fn invalid_value(msg: &str) -> Self

fn invalid_length(len: usize) -> Self

fn unknown_variant(variant: &str) -> Self

fn unknown_field(field: &str) -> Self

fn missing_field(field: &'static str) -> Self

impl Display for Error

fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

Derived Implementations

impl PartialEq for Error

fn eq(&self, __arg_0: &Error) -> bool

fn ne(&self, __arg_0: &Error) -> bool

impl Debug for Error

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Error

fn clone(&self) -> Error

1.0.0fn clone_from(&mut self, source: &Self)