I'm familiar with iter::cycle() and slice::windows(), but AFAIK you can't take windows of a cycle. Before I go off and write something myself, is there a way?
For example, let's say I have need three buffers and want to repeatedly do something with them, the first time using buf1, buf2, buf3, the second time using buf2, buf3, buf1, the third time buf3, buf1, buf2, and so on. Is something like this out there already?
slice::windows is very specific in that it exposes contiguous blocks of memory, not just abstract sequences, so it can't "wrap around" or create a combination that isn't already present in memory.
It shouldn't be too hard to create a custom iterator that cycles through 3 items.