Implement Debug for DB

master
Karl Hobley 8 years ago
parent d856b804c0
commit 7b2e1b91a7
  1. 7
      src/rocksdb.rs

@ -22,6 +22,7 @@ use std::ops::Deref;
use std::path::Path;
use std::slice;
use std::str::from_utf8;
use std::fmt;
use self::libc::size_t;
@ -784,6 +785,12 @@ impl Drop for DB {
}
}
impl fmt::Debug for DB {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "RocksDB {{ path: {:?} }}", self.path())
}
}
impl Writable for WriteBatch {
/// Insert a value into the database under the given key
fn put(&self, key: &[u8], value: &[u8]) -> Result<(), String> {

Loading…
Cancel
Save