Trait gear_common::storage::KeyIterableByKeyMap

source ·
pub trait KeyIterableByKeyMap {
    type Key1;
    type Key2;
    type DrainIter: Iterator<Item = Self::Key2>;
    type Iter: Iterator<Item = Self::Key2>;

    // Required methods
    fn drain_prefix_keys(key: Self::Key1) -> Self::DrainIter;
    fn iter_prefix_keys(key: Self::Key1) -> Self::Iter;
}
Expand description

Represents iterable over second keys logic for double key maps (Key1 -> Key2 -> Value).

Returns the iterators over specified (associated) type of the second map keys by given first key.

Required Associated Types§

source

type Key1

Map’s first key type.

source

type Key2

Map’s second key type.

source

type DrainIter: Iterator<Item = Self::Key2>

Removal iterator type.

source

type Iter: Iterator<Item = Self::Key2>

Getting iterator type.

Required Methods§

source

fn drain_prefix_keys(key: Self::Key1) -> Self::DrainIter

Creates the removal iterator over double map Items.

source

fn iter_prefix_keys(key: Self::Key1) -> Self::Iter

Creates the getting iterator over double map Items.

Object Safety§

This trait is not object safe.

Implementors§