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
SyntaxErrorThe value had some syntatic error.
EndOfStreamErrorEOF 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 Errorfn clone(&self) -> Error[src]
fn clone(&self) -> ErrorReturns 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 Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Error[src]
impl PartialEq for Errorfn eq(&self, other: &Error) -> bool[src]
fn eq(&self, other: &Error) -> boolThis 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) -> boolThis method tests for !=.
impl Error for Error[src]
impl Error for Errorfn syntax(_: &str) -> Self[src]
fn syntax(_: &str) -> SelfRaised when there is general error when deserializing a type.
fn end_of_stream() -> Self[src]
fn end_of_stream() -> SelfRaised when a Deserialize type unexpectedly hit the end of the stream.
fn unknown_field(field: &str) -> Self[src]
fn unknown_field(field: &str) -> SelfRaised when a Deserialize struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> Self[src]
fn missing_field(field: &'static str) -> SelfRaised when a Deserialize struct type did not receive a field.
fn length_mismatch(_len: usize) -> Self[src]
fn length_mismatch(_len: usize) -> SelfRaised 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) -> SelfRaised when a Deserialize was passed an incorrect type.
fn invalid_value(msg: &str) -> Self[src]
fn invalid_value(msg: &str) -> SelfRaised when a Deserialize was passed an incorrect value.