ritekv 0.1.0

RiteKV, A key-value store written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

/// Custom `Error`
#[derive(Error, Debug)]
pub enum KvsError {
    #[error("Invalid Data -> Empty Key")]
    EmptyKey,
    #[error("Invalid Data: {0}")]
    InvalidData(String),
    #[error("Internal Error -> IO Error: {0}")]
    IOError(#[from] std::io::Error),
    #[error("Internal Error: {0}")]
    Internal(String),
}

/// Custom `Result`
pub type Result<T> = std::result::Result<T, KvsError>;