linera_views::store

Trait 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.

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§

Source§

impl<TraitVariantBlanketType: WritableKeyValueStore> LocalWritableKeyValueStore for TraitVariantBlanketType

Source§

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