pub struct RocksDBWriteBatch { /* private fields */ }Expand description
An atomic batch of write operations.
Making an atomic commit of several write operations.
Implementations§
Source§impl RocksDBWriteBatch
impl RocksDBWriteBatch
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Return WriteBatch serialized size (in bytes).
Sourcepub fn put(&mut self, col: Col, key: &[u8], value: &[u8]) -> Result<()>
pub fn put(&mut self, col: Col, key: &[u8], value: &[u8]) -> Result<()>
Write the bytes into the given column with associated key.
Sourcepub fn delete(&mut self, col: Col, key: &[u8]) -> Result<()>
pub fn delete(&mut self, col: Col, key: &[u8]) -> Result<()>
Delete the data associated with the given key and given column.
Sourcepub fn delete_range<K: AsRef<[u8]>>(
&mut self,
col: Col,
range: impl Iterator<Item = K>,
) -> Result<()>
pub fn delete_range<K: AsRef<[u8]>>( &mut self, col: Col, range: impl Iterator<Item = K>, ) -> Result<()>
Remove database entries from start key to end key.
Removes the database entries in the range [“begin_key”, “end_key”), i.e., including “begin_key” and excluding “end_key”. It is not an error if no keys exist in the range [“begin_key”, “end_key”).
Auto Trait Implementations§
impl Freeze for RocksDBWriteBatch
impl RefUnwindSafe for RocksDBWriteBatch
impl !Send for RocksDBWriteBatch
impl !Sync for RocksDBWriteBatch
impl Unpin for RocksDBWriteBatch
impl UnsafeUnpin for RocksDBWriteBatch
impl UnwindSafe for RocksDBWriteBatch
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more