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

pub enum Error {
    SyntaxError,
    EndOfStreamError,
    UnknownFieldError(String),
    MissingFieldError(&'static str),
}

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

Variants

SyntaxError

The value had some syntatic error.

EndOfStreamError

EOF while deserializing a value.

UnknownFieldError(String)

Unknown field in struct.

MissingFieldError(&'static str)

Struct is missing a field.

Trait Implementations

impl PartialEq for Error
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Debug for Error
[src]

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

Formats the value using the given formatter.

impl Clone for Error
[src]

fn clone(&self) -> Error

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Error for Error
[src]

fn syntax(_: &str) -> Self

Raised when there is general error when deserializing a type.

fn end_of_stream() -> Self

Raised when a Deserialize type unexpectedly hit the end of the stream.

fn unknown_field(field: &str) -> Self

Raised when a Deserialize struct type received an unexpected struct field.

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

Raised when a Deserialize struct type did not receive a field.

fn length_mismatch(_len: usize) -> Self

Raised when a fixed sized sequence or map was passed in the wrong amount of arguments.

fn type_mismatch(_type: Type) -> Self

Raised when a Deserialize was passed an incorrect type.

fn invalid_value(msg: &str) -> Self

Raised when a Deserialize was passed an incorrect value.