pub trait StorageDoubleMapKeyProvider {
type Hasher1: StorageHasher;
type Key1: FullCodec + Send + Sync;
type Hasher2: StorageHasher;
type Key2: FullCodec + Send + Sync;
type Value: 'static + FullCodec;
const MAP_NAME: &'static str;
// Provided method
fn final_key(
pallet_prefix: &str,
key1: &Self::Key1,
key2: &Self::Key2,
) -> StorageKey { ... }
}
Expand description
Can be used to access the runtime storage key of a StorageDoubleMap
.
Required Associated Types§
Required Associated Constants§
Provided Methods§
sourcefn final_key(
pallet_prefix: &str,
key1: &Self::Key1,
key2: &Self::Key2,
) -> StorageKey
fn final_key( pallet_prefix: &str, key1: &Self::Key1, key2: &Self::Key2, ) -> StorageKey
This is a copy of the
frame_support::storage::generator::StorageDoubleMap::storage_double_map_final_key
.
We’re using it because to call storage_double_map_final_key
directly, we need access
to the runtime and pallet instance, which (sometimes) is impossible.
Object Safety§
This trait is not object safe.