|
|
|
@ -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> { |
|
|
|
|