extern crate rocksdb;

mod disk_db;

pub use self::disk_db::DiskDB;

type DBValue = Vec<u8>;

#[derive(Debug)]
pub struct DBError {
    message: String
}

impl DBError {
    pub fn new(message: String) -> Self {
        Self { message }
    }
}

pub trait ClientDB: Sync + Send {
    fn get(&self, col: &str, key: &[u8])
        -> Result<Option<DBValue>, DBError>;

    fn put(&self, col: &str, key: &[u8], val: &[u8])
        -> Result<(), DBError>;
}

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>;
}

--- 
+++ 
@@ -3,6 +3,8 @@
 mod disk_db;
 
 pub use self::disk_db::DiskDB;
+
+type DBValue = Vec<u8>;
 
 #[derive(Debug)]
 pub struct DBError {
@@ -10,12 +12,15 @@
 }
 
 impl DBError {
-    fn new(message: String) -> Self {
+    pub fn new(message: String) -> Self {
         Self { message }
     }
 }
 
 pub trait ClientDB: Sync + Send {
     fn get(&self, col: &str, key: &[u8])
-        -> Result<Option<&[u8]>, DBError>;
+        -> Result<Option<DBValue>, DBError>;
+
+    fn put(&self, col: &str, key: &[u8], val: &[u8])
+        -> Result<(), DBError>;
 }
Implement get and put on ClientDB trait
