Trait bp_runtime::StorageMapKeyProvider
source · pub trait StorageMapKeyProvider {
type Hasher: StorageHasher;
type Key: FullCodec;
type Value: FullCodec;
const MAP_NAME: &'static str;
// Provided method
fn final_key(pallet_prefix: &str, key: &Self::Key) -> StorageKey { ... }
}Expand description
Can be use to access the runtime storage key of a StorageMap.
Required Associated Types§
sourcetype Hasher: StorageHasher
type Hasher: StorageHasher
The same as StorageMap::Hasher1.
Required Associated Constants§
Provided Methods§
sourcefn final_key(pallet_prefix: &str, key: &Self::Key) -> StorageKey
fn final_key(pallet_prefix: &str, key: &Self::Key) -> StorageKey
This is a copy of the
frame_support::storage::generator::StorageMap::storage_map_final_key.
We’re using it because to call storage_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.