Trait rin::ecs::streaming_iterator::DoubleEndedStreamingIterator[][src]

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

    pub fn next_back(&mut self) -> Option<&Self::Item> { ... }
pub fn rfold<B, F>(self, init: B, f: F) -> B
    where
        F: FnMut(B, &Self::Item) -> B
, { ... } }

A streaming iterator able to yield elements from both ends.

Required methods

pub fn advance_back(&mut self)[src]

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

pub fn next_back(&mut self) -> Option<&Self::Item>[src]

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.

pub fn rfold<B, F>(self, init: B, f: F) -> B where
    F: FnMut(B, &Self::Item) -> B, 
[src]

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

Loading content...

Implementors

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

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

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

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

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

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

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

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

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

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

impl<T> DoubleEndedStreamingIterator for Once<T>[src]

impl<T> DoubleEndedStreamingIterator for Repeat<T>[src]

impl<T, F> DoubleEndedStreamingIterator for OnceWith<T, F> where
    F: FnOnce() -> T, 
[src]

Loading content...