@@ -167,6 +167,9 @@ pub trait StorageMap<K: FullEncode, V: FullCodec> {
167167 /// Load the value associated with the given key from the map.
168168 fn get < KeyArg : EncodeLike < K > > ( key : KeyArg ) -> Self :: Query ;
169169
170+ /// Store or remove the value to be associated with `key` so that `get` returns the `query`.
171+ fn set < KeyArg : EncodeLike < K > > ( key : KeyArg , query : Self :: Query ) ;
172+
170173 /// Try to get the value for the given key from the map.
171174 ///
172175 /// Returns `Ok` if it exists, `Err` if not.
@@ -481,6 +484,9 @@ pub trait StorageDoubleMap<K1: FullEncode, K2: FullEncode, V: FullCodec> {
481484 KArg1 : EncodeLike < K1 > ,
482485 KArg2 : EncodeLike < K2 > ;
483486
487+ /// Store or remove the value to be associated with `key` so that `get` returns the `query`.
488+ fn set < KArg1 : EncodeLike < K1 > , KArg2 : EncodeLike < K2 > > ( k1 : KArg1 , k2 : KArg2 , query : Self :: Query ) ;
489+
484490 /// Take a value from storage, removing it afterwards.
485491 fn take < KArg1 , KArg2 > ( k1 : KArg1 , k2 : KArg2 ) -> Self :: Query
486492 where
@@ -657,6 +663,9 @@ pub trait StorageNMap<K: KeyGenerator, V: FullCodec> {
657663 /// Returns `Ok` if it exists, `Err` if not.
658664 fn try_get < KArg : EncodeLikeTuple < K :: KArg > + TupleToEncodedIter > ( key : KArg ) -> Result < V , ( ) > ;
659665
666+ /// Store or remove the value to be associated with `key` so that `get` returns the `query`.
667+ fn set < KArg : EncodeLikeTuple < K :: KArg > + TupleToEncodedIter > ( key : KArg , query : Self :: Query ) ;
668+
660669 /// Swap the values of two keys.
661670 fn swap < KOther , KArg1 , KArg2 > ( key1 : KArg1 , key2 : KArg2 )
662671 where
0 commit comments