pub trait SimplifiedBatch:
Sized
+ Send
+ Sync
+ Send
+ Sync {
type Iter: BatchValueWriter<Self>;
// Required methods
fn from_batch<S: DeletePrefixExpander>(
store: S,
batch: Batch,
) -> impl Future<Output = Result<Self, S::Error>> + Send + Sync;
fn into_iter(self) -> Self::Iter;
fn len(&self) -> usize;
fn num_bytes(&self) -> usize;
fn overhead_size(&self) -> usize;
fn add_delete(&mut self, key: Vec<u8>);
fn add_insert(&mut self, key: Vec<u8>, value: Vec<u8>);
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
A notion of batch useful for certain computations (notably journaling).
Required Associated Types§
Sourcetype Iter: BatchValueWriter<Self>
type Iter: BatchValueWriter<Self>
The iterator type used to process values from the batch.
Required Methods§
Sourcefn from_batch<S: DeletePrefixExpander>(
store: S,
batch: Batch,
) -> impl Future<Output = Result<Self, S::Error>> + Send + Sync
fn from_batch<S: DeletePrefixExpander>( store: S, batch: Batch, ) -> impl Future<Output = Result<Self, S::Error>> + Send + Sync
Creates a simplified batch from a standard one.
Sourcefn overhead_size(&self) -> usize
fn overhead_size(&self) -> usize
Returns the overhead size of the batch.
Sourcefn add_delete(&mut self, key: Vec<u8>)
fn add_delete(&mut self, key: Vec<u8>)
Adds the deletion of key to the batch.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.