Trait linera_views::store::WritableKeyValueStore

source ·
pub trait WritableKeyValueStore: WithError + Send {
    const MAX_VALUE_SIZE: usize;

    // Required methods
    fn write_batch(
        &self,
        batch: Batch,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn clear_journal(
        &self,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}
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

Writes the batch in the database.

source

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

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 WritableKeyValueStore for MemoryStore

source§

const MAX_VALUE_SIZE: usize = 18_446_744_073_709_551_615usize

source§

impl WritableKeyValueStore for RocksDbStoreInternal

source§

const MAX_VALUE_SIZE: usize = 3_221_225_072usize

source§

impl WritableKeyValueStore for LimitedTestMemoryStore

source§

const MAX_VALUE_SIZE: usize = 100usize

source§

impl<C> WritableKeyValueStore for ViewContainer<C>
where C: Context + Sync + Send + Clone, ViewError: From<C::Error>,

source§

const MAX_VALUE_SIZE: usize = C::MAX_VALUE_SIZE

source§

impl<K> WritableKeyValueStore for JournalingKeyValueStore<K>

source§

const MAX_VALUE_SIZE: usize = K::MAX_VALUE_SIZE

source§

impl<K> WritableKeyValueStore for LruCachingStore<K>

source§

const MAX_VALUE_SIZE: usize = K::MAX_VALUE_SIZE

source§

impl<K> WritableKeyValueStore for MeteredStore<K>

source§

const MAX_VALUE_SIZE: usize = K::MAX_VALUE_SIZE

source§

impl<K> WritableKeyValueStore for ValueSplittingStore<K>
where K: WritableKeyValueStore + Send + Sync, K::Error: 'static,

source§

const MAX_VALUE_SIZE: usize = 18_446_744_073_709_551_615usize

source§

impl<S1, S2, A> WritableKeyValueStore for DualStore<S1, S2, A>

source§

const MAX_VALUE_SIZE: usize = 18_446_744_073_709_551_615usize