pub enum RedisError {
Io(Error),
IncompleteFrame,
InvalidFrame,
Utf8(Utf8Error),
ParseInt(ParseIntError),
UnexpectedResponseType,
Other(Error),
Unknown,
}
Expand description
Represents errors that can occur when working with Redis.
Variants§
Io(Error)
IncompleteFrame
An incomplete frame was received when reading from the socket.
InvalidFrame
An invalid frame was received when reading from the socket. According to RESP3 spec.
Utf8(Utf8Error)
So that we can use ?
operator to convert from std::str::Utf8Error
ParseInt(ParseIntError)
So that we can use ?
operator to convert from std::num::ParseIntError
UnexpectedResponseType
Other(Error)
All other errors are converted to anyhow::Error This is a catch-all error type that can be used to wrap any other error.
Unknown
Last resort error type. This is used when we don’t know what went wrong. Should avoid using this error type if possible.
Trait Implementations§
Source§impl Debug for RedisError
impl Debug for RedisError
Source§impl Display for RedisError
impl Display for RedisError
Source§impl Error for RedisError
impl Error for RedisError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for RedisError
impl From<Error> for RedisError
Source§impl From<Error> for RedisError
impl From<Error> for RedisError
Source§impl From<ParseIntError> for RedisError
impl From<ParseIntError> for RedisError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RedisError
impl !RefUnwindSafe for RedisError
impl Send for RedisError
impl Sync for RedisError
impl Unpin for RedisError
impl !UnwindSafe for RedisError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more