referrerpolicy=no-referrer-when-downgrade
frame_support::storage

Trait TryAppendNMap

Source
pub trait TryAppendNMap<K: KeyGenerator, T: StorageTryAppend<I>, I: Encode> {
    // Required method
    fn try_append<LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone, LikeI: EncodeLike<I>>(
        key: LikeK,
        item: LikeI,
    ) -> Result<(), ()>;
}
Expand description

Storage N map that is capable of StorageTryAppend.

Required Methods§

Source

fn try_append<LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone, LikeI: EncodeLike<I>>( key: LikeK, item: LikeI, ) -> Result<(), ()>

Try and append the item into the storage N map at the given key.

This might fail if bounds are not respected.

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<K, T, I, StorageNMapT> TryAppendNMap<K, T, I> for StorageNMapT
where K: KeyGenerator, T: FullCodec + StorageTryAppend<I>, I: Encode, StorageNMapT: StorageNMap<K, T>,