pub trait DoubleEndedStreamingIterator: StreamingIterator {
// Required method
fn advance_back(&mut self);
// Provided methods
fn next_back(&mut self) -> Option<&Self::Item> { ... }
fn rfold<B, F>(self, init: B, f: F) -> B
where Self: Sized,
F: FnMut(B, &Self::Item) -> B { ... }
}
Expand description
A streaming iterator able to yield elements from both ends.
Required Methods§
sourcefn advance_back(&mut self)
fn advance_back(&mut self)
Advances the iterator to the next element from the back of the iterator.
Double ended iterators just after the last element, so this should be called before get
when iterating in reverse.
The behavior of calling this method after the iterator has been exhausted is unspecified.