Struct restricted_tuple::Generator [] [src]

pub struct Generator<'a, T: 'a + Clone> { /* fields omitted */ }

Generator for yielding restricted tuple


impl<'a, T: 'a + Clone> Generator<'a, T>

Creates a generator.


let sets: Vec<Vec<u32>> = vec![vec![10, 20], vec![30, 40]];
let mut cache = CountingFunctionCache::new();
let generator = Generator::new(&mut cache, &sets);

Generates a restricted tuple with given length and value.


Panics when no restricted tuple can be generated. This could happen if the length is smaller than the number of sets, or if there is any empty set in the provided sets, or the provided sets itself is empty.

Trait Implementations

impl<'a, T: Clone + 'a + Clone> Clone for Generator<'a, T>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more