Trait grabbag::iter::RoundRobinIterator [] [src]

pub trait RoundRobinIterator: Iterator + Sized {
    fn round_robin<OtherIt: Iterator<Item=Self::Item>>(self, other_it: OtherIt) -> RoundRobin<Self, OtherIt> { ... }
    fn round_robin_longest<OtherIt: Iterator<Item=Self::Item>>(self, other_it: OtherIt) -> RoundRobinLongest<Self, OtherIt> { ... }
}

(a0, a1, ...), (b0, b1, ...)  →  (a0, b0, a1, b1, ...)

Provided Methods

fn round_robin<OtherIt: Iterator<Item=Self::Item>>(self, other_it: OtherIt) -> RoundRobin<Self, OtherIt>

Creates an iterator that alternates between yielding elements of the two input iterators. It stops as soon as either iterator is exhausted.

fn round_robin_longest<OtherIt: Iterator<Item=Self::Item>>(self, other_it: OtherIt) -> RoundRobinLongest<Self, OtherIt>

Creates an iterator that alternates between yielding elements of the two input iterators. If one iterator stops before the other, it is simply skipped.

Implementors