Trait gear_common::storage::IterableMap

source ·
pub trait IterableMap<Item> {
    type DrainIter: Iterator<Item = Item>;
    type Iter: Iterator<Item = Item>;

    // Required methods
    fn drain() -> Self::DrainIter;
    fn iter() -> Self::Iter;
}
Expand description

Represents iterable logic for single key maps (Key -> Value).

Required Associated Types§

source

type DrainIter: Iterator<Item = Item>

Removal iterator type.

source

type Iter: Iterator<Item = Item>

Getting iterator type.

Required Methods§

source

fn drain() -> Self::DrainIter

Creates the removal iterator over map Items.

source

fn iter() -> Self::Iter

Creates the getting iterator over map Items.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Key, Value, Error, HVS, TVS, MS, Callbacks> IterableMap<Result<Value, Error>> for DequeueImpl<Key, Value, Error, HVS, TVS, MS, Callbacks>
where Key: Clone + PartialEq, Error: DequeueError, HVS: ValueStorage<Value = Key>, TVS: ValueStorage<Value = Key>, MS: MapStorage<Key = Key, Value = LinkedNode<Key, Value>>, Callbacks: DequeueCallbacks<Value = Value>,

§

type DrainIter = DequeueDrainIter<Key, Value, Error, HVS, TVS, MS, Callbacks>

§

type Iter = DequeueIter<Key, Value, Error, HVS, TVS, MS>

source§

impl<T, OutputError, KeyGen> IterableMap<Result<<T as Dequeue>::Value, OutputError>> for QueueImpl<T, OutputError, KeyGen>
where T: Dequeue + IterableMap<Result<T::Value, T::Error>>, OutputError: From<T::Error>, KeyGen: KeyFor<Key = T::Key, Value = T::Value>,

§

type DrainIter = QueueDrainIter<T, OutputError>

§

type Iter = QueueIter<T, OutputError>

source§

impl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen> IterableMap<<T as DoubleMapStorage>::Value> for MailboxImpl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen>
where T: DoubleMapStorage<Value = (Value, Interval<BlockNumber>)> + IterableMap<T::Value>, 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> IterableMap<<T as DoubleMapStorage>::Value> for WaitlistImpl<T, Value, BlockNumber, Error, OutputError, Callbacks, KeyGen>
where T: DoubleMapStorage<Value = (Value, Interval<BlockNumber>)> + IterableMap<T::Value>, Error: WaitlistError, OutputError: From<Error>, Callbacks: WaitlistCallbacks<Value = Value, BlockNumber = BlockNumber>, KeyGen: KeyFor<Key = (T::Key1, T::Key2), Value = Value>,