Trait linera_views::batch::SimplifiedBatch
source · pub trait SimplifiedBatch: Sized + Send + Sync {
type Iter: BatchValueWriter<Self>;
// Required methods
fn from_batch<'async_trait, S>(
store: S,
batch: Batch,
) -> Pin<Box<dyn Future<Output = Result<Self, S::Error>> + Send + 'async_trait>>
where S: 'async_trait + DeletePrefixExpander + Send + Sync,
Self: 'async_trait;
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<'async_trait, S>(
store: S,
batch: Batch,
) -> Pin<Box<dyn Future<Output = Result<Self, S::Error>> + Send + 'async_trait>>
fn from_batch<'async_trait, S>( store: S, batch: Batch, ) -> Pin<Box<dyn Future<Output = Result<Self, S::Error>> + Send + 'async_trait>>
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§
Object Safety§
This trait is not object safe.