pub struct WriteBatch { /* private fields */ }Expand description
A write batch groups multiple mutations to be applied atomically.
Implementations§
Source§impl WriteBatch
impl WriteBatch
pub fn new() -> Self
pub fn put(&mut self, key: &[u8], value: &[u8])
pub fn delete(&mut self, key: &[u8])
Sourcepub fn delete_range(&mut self, begin: &[u8], end: &[u8])
pub fn delete_range(&mut self, begin: &[u8], end: &[u8])
Add a range deletion. Deletes all keys in [begin, end). Stored as: InternalKey(begin, seq, RangeDeletion) → end
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WriteBatch
impl RefUnwindSafe for WriteBatch
impl Send for WriteBatch
impl Sync for WriteBatch
impl Unpin for WriteBatch
impl UnsafeUnpin for WriteBatch
impl UnwindSafe for WriteBatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more