valuable icon indicating copy to clipboard operation
valuable copied to clipboard

Add a way to iterate on non-primitives/visit specific slices for Listable

Open Keats opened this issue 4 years ago • 0 comments

For example in templating engines, people will frequently print the value at the index n of an array. Right now keeping track of the indices of a Listable being visited is not triviall and as in the template engine case, we don't even want to visit all of them, just one.

Something like Listable::visit_slice(range: Range<usize>, &mut dyn Visit) to allow for more flexibility would be great to have. A .get(usize) would be nice too if possible

Keats avatar Jun 03 '21 20:06 Keats