nested_iter_yield!() { /* proc-macro */ }Expand description
Creates an n-nested for loop of iterators over the passed input. Assumes that the first argument can be called multiple times to produce identical iterators.
Usage
Basic syntax
nested_iter_yield!(iterable_name, 3)
Dereference values from vector iterable
nested_iter_yield!(vector_name.iter(), 3, *)
The third argument is optional. Here * is prefixed to each result of the iterator. Any value
passed as the third argument that does not begin with a . will be prefixed to each result
of the iterator.
Clone values from vector iterable
nested_iter_yield!(vector_name.iter(), 3, .clone())
Here .clone() is appended to each result of the iterator. Any value that begins with . will
be treated as a postfix.