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(String)The value had some custom error.
InvalidType(Type)The value had an incorrect type.
InvalidLength(usize)The value had an invalid length.
InvalidValue(String)The value is invalid and cannot be deserialized.
EndOfStreamEOF while deserializing a value.
UnknownVariant(String)Unknown variant in enum.
UnknownField(String)Unknown field in struct.
MissingField(&'static str)Struct is missing a field.
Trait Implementations
impl Clone for Error[src]
fn clone(&self) -> Error[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Debug for Error[src]
impl PartialEq for Error[src]
fn eq(&self, __arg_0: &Error) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Error) -> bool[src]
This method tests for !=.
impl Error for Error[src]
fn custom<T: Into<String>>(msg: T) -> Self[src]
Raised when there is general error when deserializing a type.
fn end_of_stream() -> Self[src]
Raised when a Deserialize type unexpectedly hit the end of the stream.
fn invalid_type(ty: Type) -> Self[src]
Raised when a Deserialize was passed an incorrect type.
fn invalid_value(msg: &str) -> Self[src]
Raised when a Deserialize was passed an incorrect value.
fn invalid_length(len: usize) -> Self[src]
Raised when a fixed sized sequence or map was passed in the wrong amount of arguments. Read more
fn unknown_variant(variant: &str) -> Self[src]
Raised when a Deserialize enum type received an unexpected variant.
fn unknown_field(field: &str) -> Self[src]
Raised when a Deserialize struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> Self[src]
raised when a deserialize struct type did not receive a field.
fn duplicate_field(field: &'static str) -> Self[src]
Raised when a Deserialize struct type received more than one of the same struct field. Read more
impl Display for Error[src]
fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error>[src]
Formats the value using the given formatter. Read more