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 Constants§
Required Associated Types§
Sourcetype Hasher1: StorageHasher
type Hasher1: StorageHasher
The same as StorageDoubleMap::Hasher1
.
Sourcetype Hasher2: StorageHasher
type Hasher2: StorageHasher
The same as StorageDoubleMap::Hasher2
.
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.
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.