Trait orml_utilities::iterator::IterableStorageMapExtended[][src]

pub trait IterableStorageMapExtended<K: FullEncode, V: FullCodec>: StorageMap<K, V> {
    type Iterator: Iterator<Item = (K, V)>;
    fn iter(
        max_iterations: Option<u32>,
        start_key: Option<Vec<u8>>
    ) -> Self::Iterator;
fn drain(
        max_iterations: Option<u32>,
        start_key: Option<Vec<u8>>
    ) -> Self::Iterator; }

A strongly-typed map in storage whose keys and values can be iterated over.

Associated Types

type Iterator: Iterator<Item = (K, V)>[src]

The type that iterates over all (key, value).

Loading content...

Required methods

fn iter(
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]

Enumerate all elements in the map in no particular order. If you alter the map while doing this, you'll get undefined results.

fn drain(
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]

Remove all elements from the map and iterate through them in no particular order. If you add elements to the map while doing this, you'll get undefined results.

Loading content...

Implementors

impl<K: FullCodec, V: FullCodec, G: StorageMapT<K, V>> IterableStorageMapExtended<K, V> for G where
    G::Hasher: ReversibleStorageHasher
[src]

type Iterator = StorageMapIteratorShim<K, V, G::Hasher>

fn iter(
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]

Enumerate all elements in the map.

fn drain(
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]

Enumerate all elements in the map.

Loading content...