block-db 0.2.0

Local, multi-threaded, durable byte DB.
Documentation
// Authors: Robert Lopez

use crate::uncorrupt::UncorruptAction;
use thiserror::Error;

/// Represents any Error that can occur in this crate.
#[derive(Error, Debug)]
pub enum Error {
    #[error("{0}")]
    IO(#[from] std::io::Error),
    #[error("{0}")]
    Walr(#[from] walr::error::Error),
    #[error("{0}")]
    SerdeJson(#[from] serde_json::Error),
    #[error("{0}")]
    Internal(String),
    #[error("{0}")]
    InvalidID(String),
    #[error("{0}")]
    InvalidOption(String),
    #[error("BlockDB is corrupted! Please ensure FS stability, then call `BlockDB::uncorrupt(err.action)`")]
    Corrupted {
        err: Box<Error>,
        action: UncorruptAction,
    },
}