pub trait DirectWritableKeyValueStore: WithError {
    type Batch: SimplifiedBatch + Serialize + DeserializeOwned + Default;

    const MAX_BATCH_SIZE: usize;
    const MAX_BATCH_TOTAL_SIZE: usize;
    const MAX_VALUE_SIZE: usize;

    // Required method
    fn write_batch<'life0, 'async_trait>(
        &'life0 self,
        batch: Self::Batch,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Low-level, asynchronous direct write key-value operations with simplified batch

Required Associated Types§

Required Associated Constants§

source

const MAX_BATCH_SIZE: usize

The maximal number of items in a batch.

source

const MAX_BATCH_TOTAL_SIZE: usize

The maximal number of bytes of a batch.

source

const MAX_VALUE_SIZE: usize

The maximal size of values that can be stored.

Required Methods§

source

fn write_batch<'life0, 'async_trait>( &'life0 self, batch: Self::Batch, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Writes the batch to the database.

Object Safety§

This trait is not object safe.

Implementors§