Struct rusty_leveldb::WriteBatch
[−]
[src]
pub struct WriteBatch { /* fields omitted */ }
A WriteBatch contains entries to be written to a MemTable (for example) in a compact form.
The storage format is (with the respective length in bytes)
[tag: 1, keylen: ~var, key: keylen, vallen: ~var, val: vallen]
Methods
impl WriteBatch
[src]
pub fn new() -> WriteBatch
[src]
pub fn set_contents(&mut self, from: &[u8])
[src]
Initializes a WriteBatch with a serialized WriteBatch.
pub fn put(&mut self, k: &[u8], v: &[u8])
[src]
Adds an entry to a WriteBatch, to be added to the database.
pub fn delete(&mut self, k: &[u8])
[src]
Marks an entry to be deleted from the database.
pub fn clear(&mut self)
[src]
Clear the contents of a WriteBatch.
pub fn count(&self) -> u32
[src]
Returns how many operations are in a batch.