improvement: allow batch inserts

This commit is contained in:
Timo Kösters 2021-08-03 11:24:21 +02:00
parent 0eeba86b32
commit 49ade0cfbd
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
3 changed files with 27 additions and 1 deletions

View file

@ -25,6 +25,7 @@ pub trait Tree: Send + Sync {
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>;
fn insert(&self, key: &[u8], value: &[u8]) -> Result<()>;
fn insert_batch<'a>(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()>;
fn remove(&self, key: &[u8]) -> Result<()>;