pub struct WriteBatchWithIndex { /* private fields */ }
Implementations§
Source§impl WriteBatchWithIndex
impl WriteBatchWithIndex
pub fn new(reserved_bytes: usize, overwrite_key: bool) -> Self
pub fn len(&self) -> usize
Sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Return WriteBatch serialized size (in bytes).
Sourcepub fn data(&self) -> &[u8] ⓘ
pub fn data(&self) -> &[u8] ⓘ
Return a reference to a byte array which represents a serialized version of the batch.
pub fn is_empty(&self) -> bool
pub fn get_from_batch<K>( &self, key: K, options: &Options, ) -> Result<Option<Vec<u8>>, Error>
pub fn get_from_batch_cf<K>( &self, cf: &impl AsColumnFamilyRef, key: K, options: &Options, ) -> Result<Option<Vec<u8>>, Error>
pub fn get_from_batch_and_db<T, I, K>( &self, db: &DBCommon<T, I>, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
pub fn get_pinned_from_batch_and_db<T, I, K>( &self, db: &DBCommon<T, I>, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
pub fn get_from_batch_and_db_cf<T, I, K>( &self, db: &DBCommon<T, I>, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<Vec<u8>>, Error>
pub fn get_pinned_from_batch_and_db_cf<T, I, K>( &self, db: &DBCommon<T, I>, cf: &impl AsColumnFamilyRef, key: K, readopts: &ReadOptions, ) -> Result<Option<DBPinnableSlice<'_>>, Error>
Sourcepub fn put<K, V>(&mut self, key: K, value: V)
pub fn put<K, V>(&mut self, key: K, value: V)
Insert a value into the database under the given key.
pub fn put_cf<K, V>(&mut self, cf: &impl AsColumnFamilyRef, key: K, value: V)
pub fn merge<K, V>(&mut self, key: K, value: V)
pub fn merge_cf<K, V>(&mut self, cf: &impl AsColumnFamilyRef, key: K, value: V)
Sourcepub fn delete<K: AsRef<[u8]>>(&mut self, key: K)
pub fn delete<K: AsRef<[u8]>>(&mut self, key: K)
Removes the database entry for key. Does nothing if the key was not found.
pub fn delete_cf<K: AsRef<[u8]>>(&mut self, cf: &impl AsColumnFamilyRef, key: K)
pub fn iterator_with_base<'a, D>(
&self,
base_iterator: DBRawIteratorWithThreadMode<'a, D>,
) -> DBRawIteratorWithThreadMode<'a, D>where
D: DBAccess,
pub fn iterator_with_base_cf<'a, D>(
&self,
base_iterator: DBRawIteratorWithThreadMode<'a, D>,
cf: &impl AsColumnFamilyRef,
) -> DBRawIteratorWithThreadMode<'a, D>where
D: DBAccess,
Trait Implementations§
Source§impl Drop for WriteBatchWithIndex
impl Drop for WriteBatchWithIndex
impl Send for WriteBatchWithIndex
Auto Trait Implementations§
impl Freeze for WriteBatchWithIndex
impl RefUnwindSafe for WriteBatchWithIndex
impl !Sync for WriteBatchWithIndex
impl Unpin for WriteBatchWithIndex
impl UnwindSafe for WriteBatchWithIndex
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