I'm trying to build an iterator over the rows of a table, and I'm using a lib that reads this. That lib had a proper iterator. I want to know how to chain these two iterators, I mean, when I call next on my iterator the next of the lib calls too.
impl Iterator for MyStruct {
type Item = item;
fn next(&mut self) -> Option<Self::Item> {
records().next()
}
}
I did that, but this calls only the first next every time, I want all the rows of the lib iterator.