[][src]Trait srml_support::storage::EnumerableStorageMap

pub trait EnumerableStorageMap<K: Codec, V: Codec>: StorageMap<K, V> {
    fn head() -> Option<K>;
fn enumerate() -> Box<dyn Iterator<Item = (K, V)>>
    where
        K: 'static,
        V: 'static
; }

A storage map that can be enumerated.

Primarily useful for off-chain computations. Runtime implementors should avoid enumerating storage entries on-chain.

Required methods

fn head() -> Option<K>

Return current head element.

fn enumerate() -> Box<dyn Iterator<Item = (K, V)>> where
    K: 'static,
    V: 'static, 

Enumerate all elements in the map.

Loading content...

Implementors

impl<K: Codec, V: Codec, U> EnumerableStorageMap<K, V> for U where
    U: EnumerableStorageMap<K, V>, 
[src]

Loading content...