Struct Product

#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Product<I, J>
where
    I: Iterator, { /* private fields */ }

An iterator adaptor that iterates over the cartesian product of the element sets of two iterators I and J.

Iterator element type is (I::Item, J::Item).

See .cartesian_product() for more information.

Trait Implementations

impl<I, J> FusedIterator for Product<I, J> where I: FusedIterator, J: Clone + FusedIterator, I::Item: Clone,

impl<I, J> Iterator for Product<I, J> where I: Iterator, J: Clone + Iterator, I::Item: Clone,

type Item = (<I as Iterator>::Item, <J as Iterator>::Item);
fn next(&mut self) -> Option<Self::Item>
fn size_hint(&self) -> (usize, Option<usize>)
fn fold<Acc, G>(self, accum: Acc, f: G) -> Acc
where
    G: FnMut(Acc, Self::Item) -> Acc,

impl<I, J: Clone> Clone for Product<I, J> where I: Iterator + Clone, I::Item: Clone,

fn clone(&self) -> Product<I, J>

impl<I, J: Debug> Debug for Product<I, J> where I: Iterator + Debug, I::Item: Debug,

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<I, J> Freeze for Product<I, J> where I: Freeze, Option<Option<<I as Iterator>::Item>>: Freeze, J: Freeze + Freeze,

impl<I, J> RefUnwindSafe for Product<I, J> where I: RefUnwindSafe, Option<Option<<I as Iterator>::Item>>: RefUnwindSafe, J: RefUnwindSafe + RefUnwindSafe,

impl<I, J> Send for Product<I, J> where I: Send, Option<Option<<I as Iterator>::Item>>: Send, J: Send + Send,

impl<I, J> Sync for Product<I, J> where I: Sync, Option<Option<<I as Iterator>::Item>>: Sync, J: Sync + Sync,

impl<I, J> Unpin for Product<I, J> where I: Unpin, Option<Option<<I as Iterator>::Item>>: Unpin, J: Unpin + Unpin,

impl<I, J> UnsafeUnpin for Product<I, J> where I: UnsafeUnpin, Option<Option<<I as Iterator>::Item>>: UnsafeUnpin, J: UnsafeUnpin + UnsafeUnpin,

impl<I, J> UnwindSafe for Product<I, J> where I: UnwindSafe, Option<Option<<I as Iterator>::Item>>: UnwindSafe, J: UnwindSafe + UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for Product<I, J> where I: Iterator,

type Item = <I as Iterator>::Item;
type IntoIter = I;
fn into_iter(self) -> I

impl<IT, A, FromA, B, FromB> MultiUnzip<(FromA, FromB)> for Product<I, J> where IT: Iterator<Item = (A, B)>, FromA: Default + Extend<A>, FromB: Default + Extend<B>,

fn multiunzip(self) -> (FromA, FromB)

impl<T> Any for Product<I, J> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Product<I, J> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Product<I, J> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for Product<I, J> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Product<I, J>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> IntoEither for Product<I, J>

impl<T> Itertools for Product<I, J> where T: Iterator + ?Sized,

impl<T> ToOwned for Product<I, J> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for Product<I, J> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Product<I, J> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Product<I, J> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>