Trait orml_utilities::iterator::IterableStorageDoubleMapExtended[][src]

pub trait IterableStorageDoubleMapExtended<K1: FullCodec, K2: FullCodec, V: FullCodec>: StorageDoubleMap<K1, K2, V> {
    type PrefixIterator: Iterator<Item = (K2, V)>;
    type Iterator: Iterator<Item = (K1, K2, V)>;
    fn iter_prefix(
        k1: impl EncodeLike<K1>,
        max_iterations: Option<u32>,
        start_key: Option<Vec<u8>>
    ) -> Self::PrefixIterator;
fn drain_prefix(
        k1: impl EncodeLike<K1>,
        max_iterations: Option<u32>,
        start_key: Option<Vec<u8>>
    ) -> Self::PrefixIterator;
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 PrefixIterator: Iterator<Item = (K2, V)>[src]

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

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

The type that iterates over all (key1, key2, value).

Loading content...

Required methods

fn iter_prefix(
    k1: impl EncodeLike<K1>,
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
[src]

Enumerate all elements in the map with first key k1 in no particular order. If you add or remove values whose first key is k1 to the map while doing this, you'll get undefined results.

fn drain_prefix(
    k1: impl EncodeLike<K1>,
    max_iterations: Option<u32>,
    start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
[src]

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

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 add or remove values to 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<K1: FullCodec, K2: FullCodec, V: FullCodec, G: StorageDoubleMapT<K1, K2, V>> IterableStorageDoubleMapExtended<K1, K2, V> for G where
    G::Hasher1: ReversibleStorageHasher,
    G::Hasher2: ReversibleStorageHasher
[src]

type PrefixIterator = MapIteratorShim<(K2, V)>

type Iterator = MapIteratorShim<(K1, K2, V)>

Loading content...