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

Trait TryAppendDoubleMap

Source
pub trait TryAppendDoubleMap<K1: Encode, K2: Encode, T: StorageTryAppend<I>, I: Encode> {
    // Required method
    fn try_append<LikeK1: EncodeLike<K1> + Clone, LikeK2: EncodeLike<K2> + Clone, LikeI: EncodeLike<I>>(
        key1: LikeK1,
        key2: LikeK2,
        item: LikeI,
    ) -> Result<(), ()>;
}
Expand description

Storage double map that is capable of StorageTryAppend.

Required Methods§

Source

fn try_append<LikeK1: EncodeLike<K1> + Clone, LikeK2: EncodeLike<K2> + Clone, LikeI: EncodeLike<I>>( key1: LikeK1, key2: LikeK2, item: LikeI, ) -> Result<(), ()>

Try and append the item into the storage double 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<K1, K2, T, I, StorageDoubleMapT> TryAppendDoubleMap<K1, K2, T, I> for StorageDoubleMapT
where K1: FullCodec, K2: FullCodec, T: FullCodec + StorageTryAppend<I>, I: Encode, StorageDoubleMapT: StorageDoubleMap<K1, K2, T>,