Trait grabbag::iter::cartesian_product::CartesianProductIterator [] [src]

pub trait CartesianProductIterator<LeftItem>: Iterator<Item=LeftItem> + Sized {
    fn cartesian_product<RightIt, RightItem>(self, right: RightIt) -> CartesianProduct<Self, RightIt, LeftItem, RightItem> where RightIt: Clone + Iterator<Item=RightItem> { ... }
}

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

Provided Methods

fn cartesian_product<RightIt, RightItem>(self, right: RightIt) -> CartesianProduct<Self, RightIt, LeftItem, RightItem> where RightIt: Clone + Iterator<Item=RightItem>

Creates an iterator that yields the cartesian product of two input iterators.

The element type of the first input iterator must implement Clone, as must the second iterator type.

Implementors