Batchable

Trait Batchable 

Source
pub trait Batchable:
    Gettable<Key: Array, Value: CodecShared + Clone, Error = Error>
    + Updatable
    + Deletable {
    // Provided methods
    fn start_batch(&self) -> Batch<'_, Self::Key, Self::Value, Self>
       where Self: Sized + Sync,
             Self::Value: Send + Sync { ... }
    fn write_batch<'a, Iter>(
        &'a mut self,
        iter: Iter,
    ) -> impl Future<Output = Result<(), Error>> + Send + use<'a, Self, Iter>
       where Self: Send,
             Iter: Iterator<Item = (Self::Key, Option<Self::Value>)> + Send + 'a { ... }
}
Expand description

A k/v store that supports making batched changes.

Provided Methods§

Source

fn start_batch(&self) -> Batch<'_, Self::Key, Self::Value, Self>
where Self: Sized + Sync, Self::Value: Send + Sync,

Returns a new empty batch of changes.

Source

fn write_batch<'a, Iter>( &'a mut self, iter: Iter, ) -> impl Future<Output = Result<(), Error>> + Send + use<'a, Self, Iter>
where Self: Send, Iter: Iterator<Item = (Self::Key, Option<Self::Value>)> + Send + 'a,

Writes a batch of changes to the store.

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<E, K, V, T> Batchable for commonware_storage::qmdb::store::db::Db<E, K, V, T, NonDurable>
where E: Storage + Clock + Metrics, K: Array, V: VariableValue, T: Translator,

Source§

impl<E, K, V, T, H, const N: usize> Batchable for commonware_storage::qmdb::current::ordered::fixed::Db<E, K, V, H, T, N, Unmerkleized, NonDurable>
where E: RStorage + Clock + Metrics, K: Array, V: FixedValue, T: Translator, H: Hasher,

Source§

impl<E, K, V, T, H, const N: usize> Batchable for commonware_storage::qmdb::current::unordered::fixed::Db<E, K, V, H, T, N, Unmerkleized, NonDurable>
where E: RStorage + Clock + Metrics, K: Array, V: FixedValue, T: Translator, H: Hasher,