Trait core::iter::FusedIterator
1.26.0 · source · [−]pub trait FusedIterator: Iterator { }
Expand description
An iterator that always continues to yield None
when exhausted.
Calling next on a fused iterator that has returned None
once is guaranteed
to return None
again. This trait should be implemented by all iterators
that behave this way because it allows optimizing Iterator::fuse()
.
Note: In general, you should not use FusedIterator
in generic bounds if
you need a fused iterator. Instead, you should just call Iterator::fuse()
on the iterator. If the iterator is already fused, the additional Fuse
wrapper will be a no-op with no performance penalty.
Implementors
impl<'a, I, T: 'a> FusedIterator for Cloned<I> where
I: FusedIterator<Item = &'a T>,
T: Clone,
1.36.0 · source
impl<'a, I, T: 'a> FusedIterator for Copied<I> where
I: FusedIterator<Item = &'a T>,
T: Copy,
impl<'a, P> FusedIterator for RMatchIndices<'a, P> where
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
impl<'a, P> FusedIterator for RMatches<'a, P> where
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
impl<'a, P> FusedIterator for core::str::RSplit<'a, P> where
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
impl<'a, P> FusedIterator for core::str::RSplitN<'a, P> where
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
impl<'a, P> FusedIterator for RSplitTerminator<'a, P> where
P: Pattern<'a, Searcher: ReverseSearcher<'a>>,
impl<A, B> FusedIterator for Chain<A, B> where
A: FusedIterator,
B: FusedIterator<Item = A::Item>,
impl<B, I: FusedIterator, F> FusedIterator for FilterMap<I, F> where
F: FnMut(I::Item) -> Option<B>,
impl<I, P> FusedIterator for SkipWhile<I, P> where
I: FusedIterator,
P: FnMut(&I::Item) -> bool,
impl<I, P> FusedIterator for TakeWhile<I, P> where
I: FusedIterator,
P: FnMut(&I::Item) -> bool,
1.29.0 · source
impl<I, U> FusedIterator for Flatten<I> where
I: FusedIterator<Item: IntoIterator<IntoIter = U, Item = U::Item>>,
U: Iterator,
impl<I, U, F> FusedIterator for FlatMap<I, U, F> where
I: FusedIterator,
U: IntoIterator,
F: FnMut(I::Item) -> U,
1.27.0 · source
impl<T, P> FusedIterator for core::slice::RSplit<'_, T, P> where
P: FnMut(&T) -> bool,
1.51.0 · source