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 Clone for Error
[src]
impl Clone for Error
fn clone(&self) -> Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Error
[src]
impl PartialEq for Error
fn eq(&self, other: &Error) -> bool
[src]
fn eq(&self, other: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Error) -> bool
[src]
fn ne(&self, other: &Error) -> bool
This method tests for !=
.
impl Error for Error
[src]
impl Error for Error
fn syntax(_: &str) -> Self
[src]
fn syntax(_: &str) -> Self
Raised when there is general error when deserializing a type.
fn end_of_stream() -> Self
[src]
fn end_of_stream() -> Self
Raised when a Deserialize
type unexpectedly hit the end of the stream.
fn unknown_field(field: &str) -> Self
[src]
fn unknown_field(field: &str) -> Self
Raised when a Deserialize
struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> Self
[src]
fn missing_field(field: &'static str) -> Self
Raised when a Deserialize
struct type did not receive a field.
fn length_mismatch(_len: usize) -> Self
[src]
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
[src]
fn type_mismatch(_type: Type) -> Self
Raised when a Deserialize
was passed an incorrect type.
fn invalid_value(msg: &str) -> Self
[src]
fn invalid_value(msg: &str) -> Self
Raised when a Deserialize
was passed an incorrect value.