[][src]Trait frame_support::storage::generator::StorageLinkedMap

pub trait StorageLinkedMap<K: FullCodec, V: FullCodec> {
    type Query;
    type KeyFormat: KeyFormat;
    fn from_optional_value_to_query(v: Option<V>) -> Self::Query;
fn from_query_to_optional_value(v: Self::Query) -> Option<V>; fn storage_linked_map_final_key<KeyArg>(key: KeyArg) -> Vec<u8>
    where
        KeyArg: EncodeLike<K>
, { ... }
fn storage_linked_map_final_head_key() -> Vec<u8> { ... } }

Generator for StorageLinkedMap used by decl_storage.

By default final key generation rely on KeyFormat.

Associated Types

type Query

The type that get/take returns.

type KeyFormat: KeyFormat

The family of key formats used for this map.

Loading content...

Required methods

fn from_optional_value_to_query(v: Option<V>) -> Self::Query

Convert an optional value retrieved from storage to the type queried.

fn from_query_to_optional_value(v: Self::Query) -> Option<V>

Convert a query to an optional value into storage.

Loading content...

Provided methods

Important traits for Vec<u8>
fn storage_linked_map_final_key<KeyArg>(key: KeyArg) -> Vec<u8> where
    KeyArg: EncodeLike<K>, 

Generate the full key used in top storage.

Important traits for Vec<u8>
fn storage_linked_map_final_head_key() -> Vec<u8>

Generate the hashed key for head

Loading content...

Implementors

Loading content...