Struct

core::iter::Pair

source
forall A, B.
exposed struct Pair {
    a: A,
    b: B,
}

A named pair: the item type of zip and enumerate.

Instances

instance Iterator[Zip[IA, IB] -> Pair[ItemA, ItemB]]source

forall IA, IB, ItemA, ItemB where Iterator[IA -> ItemA], Iterator[IB -> ItemB], Copy[ItemA], Copy[ItemB].
instance Iterator[Zip[IA, IB] -> Pair[ItemA, ItemB]] { ... }

In core::iter.

zip: the next item of each, paired, until either runs out.

instance Iterator[Enumerate[I] -> Pair[usize, T]]source

forall I, T where Iterator[I -> T].
instance Iterator[Enumerate[I] -> Pair[usize, T]] { ... }

In core::iter.

enumerate: the next item with its index.

instance Iterator[Drain![K, V, 'k] -> Pair[K, V]]source

forall K, V, 'k where Sized[K], Sized[V].
instance Iterator[Drain![K, V, 'k] -> Pair[K, V]] { ... }

In alloc::collections::hashmap.

The drained entries, each moved out as Pair { a: key, b: value }.