use core::{error, fmt};
use std::{io, result};
pub type Result<T> = result::Result<T, Error>;
#[derive(Debug)]
pub enum Error {
Io(std::io::Error),
Valkey(String),
}
impl From<io::Error> for Error {
fn from(e: io::Error) -> Self {
Error::Io(e)
}
}
impl error::Error for Error {}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Valkey error")
}
}