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.
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]
F: FnMut(B, &Self::Item) -> B,
Reduces the iterator’s elements to a single, final value, starting from the back.
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 ConvertMut<'a, I, T> where
T: ?Sized,
I: DoubleEndedIterator<Item = &'a mut T>,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, f: Fold) -> Acc where
Fold: FnMut(Acc, &<ConvertMut<'a, I, T> as StreamingIterator>::Item) -> Acc,
ConvertMut<'a, I, T>: Sized,
[src]
Fold: FnMut(Acc, &<ConvertMut<'a, I, T> as StreamingIterator>::Item) -> Acc,
ConvertMut<'a, I, T>: Sized,
impl<'a, I, T> DoubleEndedStreamingIterator for ConvertRef<'a, I, T> where
T: ?Sized,
I: DoubleEndedIterator<Item = &'a T>,
[src]
impl<'a, I, T> DoubleEndedStreamingIterator for ConvertRef<'a, I, T> where
T: ?Sized,
I: DoubleEndedIterator<Item = &'a T>,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, f: Fold) -> Acc where
Fold: FnMut(Acc, &<ConvertRef<'a, I, T> as StreamingIterator>::Item) -> Acc,
ConvertRef<'a, I, T>: Sized,
[src]
Fold: FnMut(Acc, &<ConvertRef<'a, I, T> as StreamingIterator>::Item) -> Acc,
ConvertRef<'a, I, T>: Sized,
impl<A, B> DoubleEndedStreamingIterator for Chain<A, B> where
B: DoubleEndedStreamingIterator<Item = <A as StreamingIterator>::Item>,
A: DoubleEndedStreamingIterator,
[src]
impl<A, B> DoubleEndedStreamingIterator for Chain<A, B> where
B: DoubleEndedStreamingIterator<Item = <A as StreamingIterator>::Item>,
A: DoubleEndedStreamingIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, F>(self, init: Acc, f: F) -> Acc where
F: FnMut(Acc, &<Chain<A, B> as StreamingIterator>::Item) -> Acc,
Chain<A, B>: Sized,
[src]
F: FnMut(Acc, &<Chain<A, B> as StreamingIterator>::Item) -> Acc,
Chain<A, B>: Sized,
impl<I> DoubleEndedStreamingIterator for Convert<I> where
I: DoubleEndedIterator,
[src]
impl<I> DoubleEndedStreamingIterator for Convert<I> where
I: DoubleEndedIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, f: Fold) -> Acc where
Fold: FnMut(Acc, &<Convert<I> as StreamingIterator>::Item) -> Acc,
Convert<I>: Sized,
[src]
Fold: FnMut(Acc, &<Convert<I> as StreamingIterator>::Item) -> Acc,
Convert<I>: Sized,
impl<I> DoubleEndedStreamingIterator for Rev<I> where
I: DoubleEndedStreamingIterator,
[src]
impl<I> DoubleEndedStreamingIterator for Rev<I> where
I: DoubleEndedStreamingIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn next_back(&mut self) -> Option<&<I as StreamingIterator>::Item>
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, f: Fold) -> Acc where
Fold: FnMut(Acc, &<Rev<I> as StreamingIterator>::Item) -> Acc,
Rev<I>: Sized,
[src]
Fold: FnMut(Acc, &<Rev<I> as StreamingIterator>::Item) -> Acc,
Rev<I>: Sized,
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 FilterMap<I, B, F> where
F: FnMut(&<I as StreamingIterator>::Item) -> Option<B>,
I: DoubleEndedStreamingIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where
Fold: FnMut(Acc, &<FilterMap<I, B, F> as StreamingIterator>::Item) -> Acc,
FilterMap<I, B, F>: Sized,
[src]
Fold: FnMut(Acc, &<FilterMap<I, B, F> as StreamingIterator>::Item) -> Acc,
FilterMap<I, B, F>: Sized,
impl<I, B, F> DoubleEndedStreamingIterator for Map<I, B, F> where
F: FnMut(&<I as StreamingIterator>::Item) -> 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]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where
Fold: FnMut(Acc, &<Map<I, B, F> as StreamingIterator>::Item) -> Acc,
Map<I, B, F>: Sized,
[src]
Fold: FnMut(Acc, &<Map<I, B, F> as StreamingIterator>::Item) -> Acc,
Map<I, B, F>: Sized,
impl<I, F> DoubleEndedStreamingIterator for Filter<I, F> where
F: FnMut(&<I as StreamingIterator>::Item) -> bool,
I: DoubleEndedStreamingIterator,
[src]
impl<I, F> DoubleEndedStreamingIterator for Filter<I, F> where
F: FnMut(&<I as StreamingIterator>::Item) -> bool,
I: DoubleEndedStreamingIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where
Fold: FnMut(Acc, &<Filter<I, F> as StreamingIterator>::Item) -> Acc,
Filter<I, F>: Sized,
[src]
Fold: FnMut(Acc, &<Filter<I, F> as StreamingIterator>::Item) -> Acc,
Filter<I, F>: Sized,
impl<I, F> DoubleEndedStreamingIterator for Inspect<I, F> where
F: FnMut(&<I as StreamingIterator>::Item),
I: DoubleEndedStreamingIterator,
[src]
impl<I, F> DoubleEndedStreamingIterator for Inspect<I, F> where
F: FnMut(&<I as StreamingIterator>::Item),
I: DoubleEndedStreamingIterator,
[src]pub fn advance_back(&mut self)
[src]
pub fn rfold<Acc, Fold>(self, init: Acc, fold: Fold) -> Acc where
Fold: FnMut(Acc, &<Inspect<I, F> as StreamingIterator>::Item) -> Acc,
Inspect<I, F>: Sized,
[src]
Fold: FnMut(Acc, &<Inspect<I, F> as StreamingIterator>::Item) -> Acc,
Inspect<I, F>: Sized,
impl<T> DoubleEndedStreamingIterator for Empty<T>
[src]
impl<T> DoubleEndedStreamingIterator for Empty<T>
[src]pub fn advance_back(&mut self)
[src]
impl<T> DoubleEndedStreamingIterator for Once<T>
[src]
impl<T> DoubleEndedStreamingIterator for Once<T>
[src]pub fn advance_back(&mut self)
[src]
impl<T> DoubleEndedStreamingIterator for Repeat<T>
[src]
impl<T> DoubleEndedStreamingIterator for Repeat<T>
[src]pub fn advance_back(&mut self)
[src]
impl<T, F> DoubleEndedStreamingIterator for OnceWith<T, F> where
F: FnOnce() -> T,
[src]
impl<T, F> DoubleEndedStreamingIterator for OnceWith<T, F> where
F: FnOnce() -> T,
[src]