# Trait std::iter::FusedIterator [−] [src]

    pub trait FusedIterator: Iterator { }

Unstable (`fused` #35602)

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 is should be implemented by all iterators that behave this way because it allows for some significant optimizations.

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<I> FusedIterator for Box<I> where I: FusedIterator + ?Sized`
- `impl<I> FusedIterator for Utf16Encoder<I> where I: FusedIterator<Item=char>`
- `impl<'a> FusedIterator for SplitWhitespace<'a>`
- `impl FusedIterator for ToLowercase`
- `impl FusedIterator for ToUppercase`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a, T> FusedIterator for Drain<'a, T> where T: 'a`
- `impl<'a, K, V> FusedIterator for Iter<'a, K, V>`
- `impl<'a, K, V> FusedIterator for IterMut<'a, K, V>`
- `impl<K, V> FusedIterator for IntoIter<K, V>`
- `impl<'a, K, V> FusedIterator for Keys<'a, K, V>`
- `impl<'a, K, V> FusedIterator for Values<'a, K, V>`
- `impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V>`
- `impl<'a, K, V> FusedIterator for Range<'a, K, V>`
- `impl<'a, K, V> FusedIterator for RangeMut<'a, K, V>`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a, T> FusedIterator for Range<'a, T>`
- `impl<'a, T> FusedIterator for Difference<'a, T> where T: Ord`
- `impl<'a, T> FusedIterator for SymmetricDifference<'a, T> where T: Ord`
- `impl<'a, T> FusedIterator for Intersection<'a, T> where T: Ord`
- `impl<'a, T> FusedIterator for Union<'a, T> where T: Ord`
- `impl<E> FusedIterator for Iter<E> where E: CLike`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<'a, T> FusedIterator for IterMut<'a, T>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a> FusedIterator for EncodeUtf16<'a>`
- `impl<'a> FusedIterator for Drain<'a>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a, T> FusedIterator for Drain<'a, T>`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<'a, T> FusedIterator for IterMut<'a, T>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a, T> FusedIterator for Drain<'a, T> where T: 'a`
- `impl FusedIterator for EscapeUnicode`
- `impl FusedIterator for EscapeDefault`
- `impl FusedIterator for EscapeDebug`
- `impl<I> FusedIterator for DecodeUtf8<I> where I: FusedIterator<Item=u8>`
- `impl<A> FusedIterator for StepBy<A, RangeFrom<A>> where A: Clone, &'a A: Add<&'a A>, &'a A::Output == A`
- `impl<A> FusedIterator for StepBy<A, Range<A>> where A: Clone + Step`
- `impl<A> FusedIterator for StepBy<A, RangeInclusive<A>> where A: Clone + Step`
- `impl<A> FusedIterator for Range<A> where A: Step, &'a A: Add<&'a A>, &'a A::Output == A`
- `impl<A> FusedIterator for RangeFrom<A> where A: Step, &'a A: Add<&'a A>, &'a A::Output == A`
- `impl<A> FusedIterator for RangeInclusive<A> where A: Step, &'a A: Add<&'a A>, &'a A::Output == A`
- `impl<A> FusedIterator for Repeat<A> where A: Clone`
- `impl<T> FusedIterator for Empty<T>`
- `impl<T> FusedIterator for Once<T>`
- `impl<'a, I> FusedIterator for &'a mut I where I: FusedIterator + ?Sized`
- `impl<I> FusedIterator for Rev<I> where I: FusedIterator + DoubleEndedIterator`
- `impl<'a, I, T> FusedIterator for Cloned<I> where I: FusedIterator<Item=&'a T>, T: 'a + Clone`
- `impl<I> FusedIterator for Cycle<I> where I: Clone + Iterator`
- `impl<A, B> FusedIterator for Chain<A, B> where A: FusedIterator, B: FusedIterator<Item=A::Item>`
- `impl<A, B> FusedIterator for Zip<A, B> where A: FusedIterator, B: FusedIterator`
- `impl<B, I, F> FusedIterator for Map<I, F> where F: FnMut(I::Item) -> B, I: FusedIterator`
- `impl<I, P> FusedIterator for Filter<I, P> where I: FusedIterator, P: FnMut(&I::Item) -> bool`
- `impl<B, I, F> FusedIterator for FilterMap<I, F> where F: FnMut(I::Item) -> Option<B>, I: FusedIterator`
- `impl<I> FusedIterator for Enumerate<I> where I: FusedIterator`
- `impl<I> FusedIterator for Peekable<I> where I: FusedIterator`
- `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`
- `impl<I> FusedIterator for Skip<I> where I: FusedIterator`
- `impl<I> FusedIterator for Take<I> where I: FusedIterator`
- `impl<B, I, St, F> FusedIterator for Scan<I, St, F> where F: FnMut(&mut St, I::Item) -> Option<B>, I: FusedIterator`
- `impl<I, U, F> FusedIterator for FlatMap<I, U, F> where F: FnMut(I::Item) -> U, I: FusedIterator, U: IntoIterator`
- `impl<I> FusedIterator for Fuse<I> where I: Iterator`
- `impl<I, F> FusedIterator for Inspect<I, F> where F: FnMut(&I::Item) -> (), I: FusedIterator`
- `impl<'a, A> FusedIterator for Iter<'a, A>`
- `impl<'a, A> FusedIterator for IterMut<'a, A>`
- `impl<A> FusedIterator for IntoIter<A>`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<'a, T> FusedIterator for IterMut<'a, T>`
- `impl<T> FusedIterator for IntoIter<T>`
- `impl<'a, T> FusedIterator for Iter<'a, T>`
- `impl<'a, T> FusedIterator for IterMut<'a, T>`
- `impl<'a, T, P> FusedIterator for Split<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, T, P> FusedIterator for SplitMut<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, T> FusedIterator for Windows<'a, T>`
- `impl<'a, T> FusedIterator for Chunks<'a, T>`
- `impl<'a, T> FusedIterator for ChunksMut<'a, T>`
- `impl<'a> FusedIterator for Chars<'a>`
- `impl<'a> FusedIterator for CharIndices<'a>`
- `impl<'a> FusedIterator for Bytes<'a>`
- `impl<'a> FusedIterator for Lines<'a>`
- `impl<'a> FusedIterator for LinesAny<'a>`
- `impl<'a, T, P> FusedIterator for SplitN<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, T, P> FusedIterator for RSplitN<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, T, P> FusedIterator for SplitNMut<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, T, P> FusedIterator for RSplitNMut<'a, T, P> where P: FnMut(&T) -> bool`
- `impl<'a, P> FusedIterator for Split<'a, P> where P: Pattern<'a>`
- `impl<'a, P> FusedIterator for RSplit<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>`
- `impl<'a, P> FusedIterator for SplitTerminator<'a, P> where P: Pattern<'a>`
- `impl<'a, P> FusedIterator for RSplitTerminator<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>`
- `impl<'a, P> FusedIterator for SplitN<'a, P> where P: Pattern<'a>`
- `impl<'a, P> FusedIterator for RSplitN<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>`
- `impl<'a, P> FusedIterator for MatchIndices<'a, P> where P: Pattern<'a>`
- `impl<'a, P> FusedIterator for RMatchIndices<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>`
- `impl<'a, P> FusedIterator for Matches<'a, P> where P: Pattern<'a>`
- `impl<'a, P> FusedIterator for RMatches<'a, P> where P: Pattern<'a>, P::Searcher: ReverseSearcher<'a>`
- `impl FusedIterator for EscapeDefault`
- `impl<'a, K, V> FusedIterator for Iter<'a, K, V>`
- `impl<'a, K, V> FusedIterator for IterMut<'a, K, V>`
- `impl<K, V> FusedIterator for IntoIter<K, V>`
- `impl<'a, K, V> FusedIterator for Keys<'a, K, V>`
- `impl<'a, K, V> FusedIterator for Values<'a, K, V>`
- `impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V>`
- `impl<'a, K, V> FusedIterator for Drain<'a, K, V>`
- `impl<'a, K> FusedIterator for Iter<'a, K>`
- `impl<K> FusedIterator for IntoIter<K>`
- `impl<'a, K> FusedIterator for Drain<'a, K>`
- `impl<'a, T, S> FusedIterator for Intersection<'a, T, S> where T: Eq + Hash, S: BuildHasher`
- `impl<'a, T, S> FusedIterator for Difference<'a, T, S> where T: Eq + Hash, S: BuildHasher`
- `impl<'a, T, S> FusedIterator for SymmetricDifference<'a, T, S> where T: Eq + Hash, S: BuildHasher`
- `impl<'a, T, S> FusedIterator for Union<'a, T, S> where T: Eq + Hash, S: BuildHasher`
- `impl<'a> FusedIterator for Iter<'a>`
- `impl<'a> FusedIterator for Components<'a>`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)