Trait fallible_streaming_iterator::DoubleEndedFallibleStreamingIterator
[−]
[src]
pub trait DoubleEndedFallibleStreamingIterator: FallibleStreamingIterator { fn advance_back(&mut self) -> Result<(), Self::Error>; fn next_back(&mut self) -> Result<Option<&Self::Item>, Self::Error> { ... } }
A fallible, streaming iterator which can be advanced from either end.
Required Methods
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
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
impl<'a, I, T, E> DoubleEndedFallibleStreamingIterator for Convert<'a, I, T> where
I: DoubleEndedIterator<Item = Result<&'a T, E>>,impl<T, E> DoubleEndedFallibleStreamingIterator for Empty<T, E>
impl<I, F, B> DoubleEndedFallibleStreamingIterator for Map<I, F, B> where
I: DoubleEndedFallibleStreamingIterator,
F: FnMut(&I::Item) -> B,impl<I, F, B: ?Sized> DoubleEndedFallibleStreamingIterator for MapRef<I, F> where
I: DoubleEndedFallibleStreamingIterator,
F: Fn(&I::Item) -> &B,impl<I, F, B> DoubleEndedFallibleStreamingIterator for MapErr<I, F> where
I: DoubleEndedFallibleStreamingIterator,
F: Fn(I::Error) -> B,