Trait std::iter::FusedIterator 1.26.0[−][src]
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.
Implementations on Foreign Types
impl<'_, T, S, A> FusedIterator for Difference<'_, T, S, A> where
T: Eq + Hash,
S: BuildHasher,
A: Allocator + Clone,
impl<'_, K, F, A> FusedIterator for DrainFilter<'_, K, F, A> where
F: FnMut(&K) -> bool,
A: Allocator + Clone,
impl<'_, K, V> FusedIterator for IterMut<'_, K, V>
impl<'_, K, V> FusedIterator for ValuesMut<'_, K, V>
impl<'_, K, V> FusedIterator for Iter<'_, K, V>
impl<'_, T, S, A> FusedIterator for SymmetricDifference<'_, T, S, A> where
T: Eq + Hash,
S: BuildHasher,
A: Allocator + Clone,
impl<'_, T, S, A> FusedIterator for Union<'_, T, S, A> where
T: Eq + Hash,
S: BuildHasher,
A: Allocator + Clone,
impl<'_, K> FusedIterator for Iter<'_, K>
impl<'_, K, V, A> FusedIterator for Drain<'_, K, V, A> where
A: Allocator + Clone,
impl<'_, K, V> FusedIterator for Keys<'_, K, V>
impl<'_, K, V, F> FusedIterator for DrainFilter<'_, K, V, F, Global> where
F: FnMut(&K, &mut V) -> bool,
impl<'_, T, S, A> FusedIterator for Intersection<'_, T, S, A> where
T: Eq + Hash,
S: BuildHasher,
A: Allocator + Clone,
impl<K, V, A> FusedIterator for IntoIter<K, V, A> where
A: Allocator + Clone,
impl<K, A> FusedIterator for IntoIter<K, A> where
A: Allocator + Clone,
impl<'_, K, V> FusedIterator for Values<'_, K, V>
impl<'_, K, A> FusedIterator for Drain<'_, K, A> where
A: Allocator + Clone,
Implementors
impl<'_, K, V, F> FusedIterator for std::collections::btree_map::DrainFilter<'_, K, V, F> where
F: FnMut(&K, &mut V) -> bool,
impl<'_, T> FusedIterator for std::collections::btree_set::SymmetricDifference<'_, T> where
T: Ord,
impl<'_, T, A> FusedIterator for std::collections::vec_deque::Drain<'_, T, A> where
A: Allocator,
impl<'_, T, F> FusedIterator for std::collections::btree_set::DrainFilter<'_, T, F> where
F: FnMut(&T) -> bool,
1.27.0[src]
impl<'_, T, P> FusedIterator for std::slice::RSplit<'_, T, P> where
P: FnMut(&T) -> bool,
impl<'a, I, T> FusedIterator for Cloned<I> where
T: 'a + Clone,
I: FusedIterator<Item = &'a T>,
1.36.0[src]
impl<'a, I, T> FusedIterator for Copied<I> where
T: 'a + Copy,
I: FusedIterator<Item = &'a T>,
impl<'a, P> FusedIterator for RMatchIndices<'a, P> where
P: Pattern<'a>,
<P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,
impl<'a, P> FusedIterator for RMatches<'a, P> where
P: Pattern<'a>,
<P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,
impl<'a, P> FusedIterator for std::str::RSplit<'a, P> where
P: Pattern<'a>,
<P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,
impl<'a, P> FusedIterator for std::str::RSplitN<'a, P> where
P: Pattern<'a>,
<P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,
impl<'a, P> FusedIterator for RSplitTerminator<'a, P> where
P: Pattern<'a>,
<P as Pattern<'a>>::Searcher: ReverseSearcher<'a>,
impl<A, B> FusedIterator for Chain<A, B> where
B: FusedIterator<Item = <A as Iterator>::Item>,
A: FusedIterator,
impl<B, I, F> FusedIterator for FilterMap<I, F> where
F: FnMut(<I as Iterator>::Item) -> Option<B>,
I: FusedIterator,
impl<B, I, F> FusedIterator for Map<I, F> where
F: FnMut(<I as Iterator>::Item) -> B,
I: FusedIterator,
impl<I, F> FusedIterator for Inspect<I, F> where
F: FnMut(&<I as Iterator>::Item),
I: FusedIterator,
impl<I, P> FusedIterator for Filter<I, P> where
I: FusedIterator,
P: FnMut(&<I as Iterator>::Item) -> bool,
impl<I, P> FusedIterator for SkipWhile<I, P> where
I: FusedIterator,
P: FnMut(&<I as Iterator>::Item) -> bool,
impl<I, P> FusedIterator for TakeWhile<I, P> where
I: FusedIterator,
P: FnMut(&<I as Iterator>::Item) -> bool,
1.29.0[src]