Struct

core::iter::Zip

source
forall IA, IB.
exposed struct Zip {
    a: IA,
    b: IB,
    done: bool,
}

Pairs the two iterators' items until either runs out. Both sides are pulled before either is inspected, so an item left over when the other side ends is dropped: Copy[ItemA], Copy[ItemB]. Once one side has run out, neither is pulled again (done).

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.