[][src]Trait streaming_iterator::DoubleEndedStreamingIterator

pub trait DoubleEndedStreamingIterator: StreamingIterator {
    fn advance_back(&mut self);

    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
, { ... } }

A streaming iterator able to yield elements from both ends.

Required methods

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.

Loading content...

Provided methods

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

Advances the iterator and returns the next value from the back.

The behavior of calling this method after the iterator has been exhausted is unspecified.

The default implementation simply calls advance_back followed by get.

fn rfold<B, F>(self, init: B, f: F) -> B where
    Self: Sized,
    F: FnMut(B, &Self::Item) -> B, 

Reduces the iterator's elements to a single, final value, starting from the back.

Loading content...

Implementors

impl<'a, I, T: ?Sized> DoubleEndedStreamingIterator for ConvertRef<'a, I, T> where
    I: DoubleEndedIterator<Item = &'a T>, 
[src]

impl<A, B> DoubleEndedStreamingIterator for Chain<A, B> where
    A: DoubleEndedStreamingIterator,
    B: DoubleEndedStreamingIterator<Item = A::Item>, 
[src]

impl<I> DoubleEndedStreamingIterator for Convert<I> where
    I: DoubleEndedIterator
[src]

impl<I> DoubleEndedStreamingIterator for Empty<I>[src]

impl<I> DoubleEndedStreamingIterator for Rev<I> where
    I: DoubleEndedStreamingIterator
[src]

impl<I, B, F> DoubleEndedStreamingIterator for FilterMap<I, B, F> where
    I: DoubleEndedStreamingIterator,
    F: FnMut(&I::Item) -> Option<B>, 
[src]

impl<I, B, F> DoubleEndedStreamingIterator for Map<I, B, F> where
    I: DoubleEndedStreamingIterator,
    F: FnMut(&I::Item) -> B, 
[src]

impl<I, F> DoubleEndedStreamingIterator for Filter<I, F> where
    I: DoubleEndedStreamingIterator,
    F: FnMut(&I::Item) -> bool
[src]

impl<I, F> DoubleEndedStreamingIterator for Inspect<I, F> where
    I: DoubleEndedStreamingIterator,
    F: FnMut(&I::Item), 
[src]

Loading content...