IterableMap

Trait 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.

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<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>,

Source§

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

Source§

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>,

Source§

type DrainIter = QueueDrainIter<T, OutputError>

Source§

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>,