Trait linera_views::store::LocalWritableKeyValueStore

source ·
pub trait LocalWritableKeyValueStore: WithError {
    const MAX_VALUE_SIZE: usize;

    // Required methods
    async fn write_batch(&self, batch: Batch) -> Result<(), Self::Error>;
    async fn clear_journal(&self) -> Result<(), Self::Error>;
}
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

async fn write_batch(&self, batch: Batch) -> Result<(), Self::Error>

Writes the batch in the database.

source

async fn clear_journal(&self) -> Result<(), Self::Error>

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TraitVariantBlanketType: WritableKeyValueStore> LocalWritableKeyValueStore for TraitVariantBlanketType

source§

const MAX_VALUE_SIZE: usize = <Self as WritableKeyValueStore>::MAX_VALUE_SIZE