pub trait StorageMapExt<K, V> where
    Self: StorageMap<K, V>,
    K: FullEncode + Encode + EncodeLike,
    V: FullCodec + Decode + FullEncode + Encode + EncodeLike
{ fn mutate_or_err<KeyArg: EncodeLike<K>, F: FnOnce(&mut V)>(
        key: KeyArg,
        f: F
    ) -> DispatchResultWithPostInfo { ... } }
Expand description

Adds behavior to StorageMaps.

Provided methods

If the key exists in the map, modifies it with the provided function, otherwise, an error is returned.

Implementors