Deletable

Trait Deletable 

Source
pub trait Deletable: Updatable {
    // Required method
    fn delete<'a>(
        &'a mut self,
        key: Self::Key,
    ) -> impl Future<Output = Result<bool, Self::Error>> + Send + use<'a, Self>;
}
Expand description

A mutable key-value store that supports deleting values.

Required Methods§

Source

fn delete<'a>( &'a mut self, key: Self::Key, ) -> impl Future<Output = Result<bool, Self::Error>> + Send + use<'a, Self>

Delete the value of a key.

Returns true if the key existed and was deleted, false if it did not exist.

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<'a, K, V, D> Deletable for Batch<'a, K, V, D>
where K: Array, V: CodecShared + Clone, D: Gettable<Key = K, Value = V, Error = Error> + Sync,

Source§

impl<E, K, V, T> Deletable 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: RStorage + Clock + Metrics, K: Array, V: FixedValue, H: Hasher, T: Translator, const N: usize> Deletable for commonware_storage::qmdb::current::ordered::fixed::Db<E, K, V, H, T, N, Unmerkleized, NonDurable>

Source§

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