lighthouse-pulse/lighthouse/db/mod.rs
Paul Hauner 33b1e6ddf4 Partially implemented db wrapper
Addresses issue #12
2018-09-17 17:52:32 +10:00

22 lines
337 B
Rust

extern crate rocksdb;
mod disk_db;
pub use self::disk_db::DiskDB;
#[derive(Debug)]
pub struct DBError {
message: String
}
impl DBError {
fn new(message: String) -> Self {
Self { message }
}
}
pub trait ClientDB: Sync + Send {
fn get(&self, col: &str, key: &[u8])
-> Result<Option<&[u8]>, DBError>;
}