pub struct Batch { /* private fields */ }Expand description
An atomic write batch
Allows atomically writing across partitions inside the Keyspace.
Implementations§
Source§impl Batch
impl Batch
Sourcepub fn with_capacity(keyspace: Keyspace, capacity: usize) -> Self
pub fn with_capacity(keyspace: Keyspace, capacity: usize) -> Self
Initializes a new write batch with preallocated capacity.
Sourcepub fn durability(self, mode: Option<PersistMode>) -> Self
pub fn durability(self, mode: Option<PersistMode>) -> Self
Sets the durability level.
Sourcepub fn insert<K: Into<UserKey>, V: Into<UserValue>>(
&mut self,
p: &PartitionHandle,
key: K,
value: V,
)
pub fn insert<K: Into<UserKey>, V: Into<UserValue>>( &mut self, p: &PartitionHandle, key: K, value: V, )
Inserts a key-value pair into the batch
Sourcepub fn remove<K: Into<UserKey>>(&mut self, p: &PartitionHandle, key: K)
pub fn remove<K: Into<UserKey>>(&mut self, p: &PartitionHandle, key: K)
Adds a tombstone marker for a key
Auto Trait Implementations§
impl Freeze for Batch
impl !RefUnwindSafe for Batch
impl Send for Batch
impl Sync for Batch
impl Unpin for Batch
impl !UnwindSafe for Batch
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