linera_views::store

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

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