Skip to main content

InsertStrict

Trait InsertStrict 

Source
pub trait InsertStrict<K, V>: StorageBackend {
    // Required method
    fn insert_strict(&self, key: &K, value: &V) -> Result<(), Self::Error>;
}
Expand description

InsertStrict<K, V> trait extends the StorageBackend with insert_strict operation for the (key: K, value: V) pair; therefore, it should be explicitly implemented for the corresponding StorageBackend.

Required Methods§

Source

fn insert_strict(&self, key: &K, value: &V) -> Result<(), Self::Error>

Inserts the (K, V) pair in the storage without overwriting the value if it already exists.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§