pub trait Append: Stash {
fn append_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn append<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>
where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
{ ... }
}Expand description
A multi-collection extension of Stash.
Additional methods for Stash implementations that are able to provide atomic operations over multiple collections.
Required Methods§
sourcefn append_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_batch<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Same as append, but does not consolidate batches.
Provided Methods§
sourcefn append<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append<'life0, 'life1, 'async_trait>(
&'life0 mut self,
batches: &'life1 [AppendBatch]
) -> Pin<Box<dyn Future<Output = Result<(), StashError>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically adds entries, seals, compacts, and consolidates multiple collections.
The lower of each AppendBatch is checked to be the existing upper of the collection.
The upper of the AppendBatch will be the new upper of the collection.
The compact of each AppendBatch will be the new since of the collection.
If this method returns Ok, the entries have been made durable and uppers
advanced, otherwise no changes were committed.