pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("not found")]
NotFound,
#[error("already exists")]
AlreadyExists,
#[error("encoding failed")]
Encoding(#[from] ron::Error),
#[error("malformed key")]
MalformedKey,
#[error("internal rocksdb error: {0}")]
Internal(#[from] rocksdb::Error),
#[error("database creation failed: {0}")]
CreateDirectory(std::io::Error),
}