#[derive(thiserror::Error, Debug)]
pub enum RedisError {
#[error("error from io")]
Io(#[from] std::io::Error),
#[error("incomplete frame")]
IncompleteFrame,
#[error("invalid frame")]
InvalidFrame,
#[error("utf8 error")]
Utf8(#[from] std::str::Utf8Error),
#[error("parseint error")]
ParseInt(#[from] std::num::ParseIntError),
#[error("unexpected response type")]
UnexpectedResponseType,
#[error(transparent)]
Other(#[from] anyhow::Error), #[error("unknown error")]
Unknown,
}
pub type Result<T> = anyhow::Result<T, RedisError>;