Trait std::iter::DoubleEndedIterator
pub trait DoubleEndedIterator<A>: Iterator<A> { fn next_back(&mut self) -> Option<A>; fn rev(self) -> Rev<Self> { ... } }
A range iterator able to yield elements from both ends
Required Methods
fn next_back(&mut self) -> Option<A>
Yield an element from the end of the range, returning None
if the range is empty.
Provided Methods
fn rev(self) -> Rev<Self>
Change the direction of the iterator
The flipped iterator swaps the ends on an iterator that can already be iterated from the front and from the back.
If the iterator also implements RandomAccessIterator, the flipped iterator is also random access, with the indices starting at the back of the original iterator.
Note: Random access with flipped indices still only applies to the first
uint::MAX
elements of the original iterator.
Implementors
Item<A>
Repeat<A>
RangeInclusive<A>
Range<A>
Inspect<'a, A, T>
Fuse<T>
FlatMap<'a, A, T, U>
Enumerate<T>
FilterMap<'a, A, B, T>
Filter<'a, A, T>
Map<'a, A, B, T>
Zip<T, U>
Chain<T, U>
ByRef<'a, T>
Rev<T>
CharSplits<'a, Sep>
CharOffsets<'a>
Chars<'a>
MoveItems<T>
MoveItems<T>
MutChunks<'a, T>
MutSplits<'a, T>
MutItems<'a, T>
Items<'a, T>
Chunks<'a, T>