How do I write an iterator that returns references to itself?
As far as I understand, you want want the iterator to return a vector of references into itself, right? Unfortunately, it is not possible in Rust. This is the trimmed down Iterator trait: trait Iterator { type Item; fn next(&mut self) -> Option<Item>; } Note that there is no lifetime connection between &mut self and … Read more