SelfCartesianProductIntoRefParams

Type Alias SelfCartesianProductIntoRefParams 

Source
pub type SelfCartesianProductIntoRefParams<'a, T> = (&'a [T], usize, *mut [&'a T]);
Expand description

A type that used exclusively for trait CartesianProduct. It return SelfCartesianProductRefIter.

§Format

  1. A slice of T.
  2. How many time to create a product on slice
  3. A mutable pointer to a slice of ref T

Trait Implementations§

Source§

impl<'a, 'b: 'a, T> CartesianProduct<'a> for SelfCartesianProductIntoRefParams<'b, T>
where T: 'b,

An implementation for convenient use of SelfCartesianProductRefIter

§Warning

It hid unsafe object instantiation of SelfCartesianProductRefIter from user but all unsafe conditions are still applied as long as the life of object itself.

Source§

type Producer = SelfCartesianProductRefIter<'b, T>

Source§

fn cart_prod(&'a self) -> Self::Producer

Create a cartesian product producer which can be used to iterate over each product.