feat: re-export rocksdb snapshot function

This commit is contained in:
Quentin de Quelen 2019-09-17 10:35:44 +02:00
parent 3712fa7c24
commit 5bc5185ac5

View File

@ -121,4 +121,11 @@ impl Database {
pub fn common_index(&self) -> Arc<CommonIndex> { pub fn common_index(&self) -> Arc<CommonIndex> {
self.common.clone() self.common.clone()
} }
pub fn checkpoint_to<P>(&self, path: P) -> Result<(), Error>
where P: AsRef<Path>,
{
let checkpoint = rocksdb::checkpoint::Checkpoint::new(&self.inner)?;
Ok(checkpoint.create_checkpoint(path)?)
}
} }