pub struct DBWriteBatch { /* private fields */ }
Expand description
A write batch holds a collection of updates to apply atomically to a database. Updates are applied in the order in which they are added to the write batch.
Implementations§
Source§impl DBWriteBatch
impl DBWriteBatch
Sourcepub fn new() -> Option<DBWriteBatch>
pub fn new() -> Option<DBWriteBatch>
Create a new, empty write batch. Returns None if the underlying library call returns a null pointer.
Sourcepub fn put(&mut self, key: &[u8], val: &[u8])
pub fn put(&mut self, key: &[u8], val: &[u8])
Set the database entry for “key” to “value”. See put()
on DB
for
more information.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DBWriteBatch
impl RefUnwindSafe for DBWriteBatch
impl !Send for DBWriteBatch
impl !Sync for DBWriteBatch
impl Unpin for DBWriteBatch
impl UnwindSafe for DBWriteBatch
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