bee_storage/access/
delete.rs

1// Copyright 2020-2021 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4use crate::backend::StorageBackend;
5
6/// `Delete<K, V>` trait extends the `StorageBackend` with `delete` operation for the (key: K, value: V) pair;
7/// therefore, it should be explicitly implemented for the corresponding `StorageBackend`.
8pub trait Delete<K, V>: StorageBackend {
9    /// Deletes the value associated with the key from the storage.
10    fn delete(&self, key: &K) -> Result<(), Self::Error>;
11}