IterableByKeyMap

Trait IterableByKeyMap 

Source
pub trait IterableByKeyMap<Item> {
    type Key;
    type DrainIter: Iterator<Item = Item>;
    type Iter: Iterator<Item = Item>;

    // Required methods
    fn drain_key(key: Self::Key) -> Self::DrainIter;
    fn iter_key(key: Self::Key) -> Self::Iter;
}
Expand description

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

Returns the iterators over specified (associated) type of the first key’s items.

Required Associated Types§

Source

type Key

Map’s first key type.

Source

type DrainIter: Iterator<Item = Item>

Removal iterator type.

Source

type Iter: Iterator<Item = Item>

Getting iterator type.

Required Methods§

Source

fn drain_key(key: Self::Key) -> Self::DrainIter

Creates the removal iterator over double map Items.

Source

fn iter_key(key: Self::Key) -> Self::Iter

Creates the getting iterator over double map Items.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen> IterableByKeyMap<<T as DoubleMapStorage>::Value> for MailboxImpl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen>
where T: DoubleMapStorage<Value = (Value, Interval<BlockNumber>)> + IterableByKeyMap<T::Value, Key = T::Key1>, Error: MailboxError, OutputError: From<Error>, Callbacks: MailboxCallbacks<OutputError, Value = Value, BlockNumber = BlockNumber>, KeyGen: KeyFor<Key = (T::Key1, T::Key2), Value = Value>,

Source§

impl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen> IterableByKeyMap<<T as DoubleMapStorage>::Value> for WaitlistImpl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen>
where T: DoubleMapStorage<Value = (Value, Interval<BlockNumber>)> + IterableByKeyMap<T::Value, Key = T::Key1>, Error: WaitlistError, OutputError: From<Error>, Callbacks: WaitlistCallbacks<Value = Value, BlockNumber = BlockNumber>, KeyGen: KeyFor<Key = (T::Key1, T::Key2), Value = Value>,

Source§

impl<T: AuxiliaryDoubleStorageWrap> IterableByKeyMap<<T as AuxiliaryDoubleStorageWrap>::Value> for T

Available on crate feature std only.