Enum serde_redis::decode::Error [] [src]

pub enum Error {
    Custom(String),
    TypeMismatch(String),
    EndOfStream,
    UnknownField(String),
    MissingField(&'static str),
    DeserializeNotSupported,
    WrongValue(String),
    FromUtf8(FromUtf8Error),
    ParseInt(ParseIntError),
    ParseFloat(ParseFloatError),
}

Error that can be produced during deserialization

Variants

Custom
TypeMismatch
EndOfStream
UnknownField
MissingField
DeserializeNotSupported
WrongValue
FromUtf8
ParseInt
ParseFloat

Methods

impl Error

fn wrong_value<S>(msg: S) -> Error where S: Into<String>

Trait Implementations

impl Error for Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

impl Display for Error

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

impl Error for Error

fn custom<T: Into<String>>(msg: T) -> Self

fn end_of_stream() -> Self

fn invalid_value(msg: &str) -> Self

fn invalid_length(len: usize) -> Self

fn unknown_variant(field: &str) -> Self

fn unknown_field(field: &str) -> Error

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

fn invalid_type(t: Type) -> Error

impl From<FromUtf8Error> for Error

fn from(err: FromUtf8Error) -> Error

impl From<ParseIntError> for Error

fn from(err: ParseIntError) -> Error

impl From<ParseFloatError> for Error

fn from(err: ParseFloatError) -> Error

Derived Implementations

impl Debug for Error

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