Enum serde_redis::decode::Error
[−]
[src]
pub enum Error { Custom(String), EndOfStream, UnknownVariant(String, &'static [&'static str]), UnknownField(String, &'static [&'static str]), MissingField(&'static str), DuplicateField(&'static str), DeserializeNotSupported, WrongValue(String), FromUtf8(FromUtf8Error), ParseInt(ParseIntError), ParseFloat(ParseFloatError), }
Error that can be produced during deserialization
Variants
Custom(String)
EndOfStream
UnknownVariant(String, &'static [&'static str])
UnknownField(String, &'static [&'static str])
MissingField(&'static str)
DuplicateField(&'static str)
DeserializeNotSupported
WrongValue(String)
FromUtf8(FromUtf8Error)
ParseInt(ParseIntError)
ParseFloat(ParseFloatError)
Methods
impl Error
[src]
fn wrong_value<S>(msg: S) -> Error where
S: Into<String>,
[src]
S: Into<String>,
Trait Implementations
impl Debug for Error
[src]
impl Error for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
[src]
The lower-level cause of this error, if any. Read more
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Error for Error
[src]
fn custom<T: Display>(msg: T) -> Self
[src]
Raised when there is general error when deserializing a type.
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
[src]
Raised when a Deserialize
enum type received an unexpected variant.
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Error
[src]
Raised when a Deserialize
struct type received a field with an unrecognized name. Read more
fn missing_field(field: &'static str) -> Error
[src]
Raised when a Deserialize
struct type expected to receive a required field with a particular name but that field was not present in the input. Read more
fn duplicate_field(field: &'static str) -> Error
[src]
Raised when a Deserialize
struct type received more than one of the same field. Read more
fn invalid_type(unexp: Unexpected, exp: &Expected) -> Self
[src]
Raised when a Deserialize
receives a type different from what it was expecting. Read more
fn invalid_value(unexp: Unexpected, exp: &Expected) -> Self
[src]
Raised when a Deserialize
receives a value of the right type but that is wrong for some other reason. Read more
fn invalid_length(len: usize, exp: &Expected) -> Self
[src]
Raised when deserializing a sequence or map and the input data contains too many or too few elements. Read more
impl From<FromUtf8Error> for Error
[src]
fn from(err: FromUtf8Error) -> Error
[src]
Performs the conversion.
impl From<ParseIntError> for Error
[src]
fn from(err: ParseIntError) -> Error
[src]
Performs the conversion.
impl From<ParseFloatError> for Error
[src]
fn from(err: ParseFloatError) -> Error
[src]
Performs the conversion.