pub trait DoubleEndedFallibleStreamingIterator: FallibleStreamingIterator {
    // Required method
    fn advance_back(&mut self) -> Result<(), Self::Error>;

    // Provided method
    fn next_back(&mut self) -> Result<Option<&Self::Item>, Self::Error> { ... }
}
Expand description

A fallible, streaming iterator which can be advanced from either end.

Required Methods§

source

fn advance_back(&mut self) -> Result<(), Self::Error>

Advances the state of the iterator to the next item from the end.

Iterators start just after the last item, so this method should be called before get when iterating.

The behavior of calling this method after get has returned None, or after this method or advance has returned an error is unspecified.

Provided Methods§

source

fn next_back(&mut self) -> Result<Option<&Self::Item>, Self::Error>

Advances the back of the iterator, returning the last element.

The default implementation simply calls advance_back followed by get.

Implementors§