pub struct BlobIndexBatch { /* private fields */ }Expand description
Atomic batch over the blob index.
Drop without Self::commit and nothing is written. The batch holds a
Db clone, so the column-family handles stay valid for the batch’s
lifetime even if the BlobIndex is dropped first.
Implementations§
Source§impl BlobIndexBatch
impl BlobIndexBatch
Sourcepub fn insert(&mut self, key: &[u8], value: &[u8])
pub fn insert(&mut self, key: &[u8], value: &[u8])
Stage key -> value in the blob-entry column family.
Sourcepub fn insert_meta(&mut self, key: &[u8], value: &[u8])
pub fn insert_meta(&mut self, key: &[u8], value: &[u8])
Stage key -> value in the maintenance (default) column family.
Sourcepub fn commit(self) -> Result<(), StorageError>
pub fn commit(self) -> Result<(), StorageError>
Commit every staged put/delete atomically. Durable on return: the
blob index is opened with RocksDbTuning::blob_index, whose
synchronous WAL writes fsync the batch’s WAL entry inside this call
(see crate::RocksDbTuning::sync_writes).
Auto Trait Implementations§
impl Freeze for BlobIndexBatch
impl RefUnwindSafe for BlobIndexBatch
impl !Send for BlobIndexBatch
impl !Sync for BlobIndexBatch
impl Unpin for BlobIndexBatch
impl UnsafeUnpin for BlobIndexBatch
impl UnwindSafe for BlobIndexBatch
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