Trait WritableKeyValueStore

Source
pub trait WritableKeyValueStore:
    WithError
    + Send
    + Sync {
    const MAX_VALUE_SIZE: usize;

    // Required methods
    fn write_batch(
        &self,
        batch: Batch,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send + Sync;
    fn clear_journal(
        &self,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send + Sync;
}
Expand description

Low-level, asynchronous write key-value operations. Useful for storage APIs not based on views.

Required Associated Constants§

Source

const MAX_VALUE_SIZE: usize

The maximal size of values that can be stored.

Required Methods§

Source

fn write_batch( &self, batch: Batch, ) -> impl Future<Output = Result<(), Self::Error>> + Send + Sync

Writes the batch in the database.

Source

fn clear_journal( &self, ) -> impl Future<Output = Result<(), Self::Error>> + Send + Sync

Clears any journal entry that may remain. The journal is located at the root_key.

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.

Implementors§