valkey 0.0.0-alpha5

An ergonomic, synchronous Valkey driver
Documentation
use core::{error, fmt};
use std::{io, result};

pub type Result<T> = result::Result<T, Error>;

/// A Valkey 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")
    }
}