Trait std::iter::IteratorStable
[-] [+]
[src]
pub trait Iterator where <Self as Iterator>::Item: Sized {
type Item;
fn next(&mut self) -> Option<<Self as Iterator>::Item>;
fn size_hint(&self) -> (usize, Option<usize>) { ... }
}
An interface for dealing with "external iterators". These types of iterators can be resumed at any time as all state is stored internally as opposed to being located on the call stack.
The Iterator protocol states that an iterator yields a (potentially-empty,
potentially-infinite) sequence of values, and returns None
to signal that
it's finished. The Iterator protocol does not define behavior after None
is returned. A concrete Iterator implementation may choose to behave however
it wishes, either by returning None
infinitely, or by doing something
else.
Associated Types
Required Methods
fn next(&mut self) -> Option<<Self as Iterator>::Item>
Advance the iterator and return the next value. Return None
when the end is reached.
Provided Methods
fn size_hint(&self) -> (usize, Option<usize>)
Returns a lower and upper bound on the remaining length of the iterator.
An upper bound of None
means either there is no known upper bound, or the upper bound
does not fit within a usize
.
Implementors
impl Iterator for EscapeUnicode
impl Iterator for EscapeDefault
impl<'a, I> Iterator for &'a mut I where I: Iterator, I: ?Sized
impl<I> Iterator for Rev<I> where I: DoubleEndedIterator
impl<T, D, I> Iterator for Cloned<I> where T: Clone, D: Deref, <D as Deref>::Target == T, I: Iterator, <I as Iterator>::Item == D
impl<I> Iterator for Cycle<I> where I: Clone, I: Iterator
impl<T, A, B> Iterator for Chain<A, B> where A: Iterator, <A as Iterator>::Item == T, B: Iterator, <B as Iterator>::Item == T
impl<T, U, A, B> Iterator for Zip<A, B> where A: Iterator, <A as Iterator>::Item == T, B: Iterator, <B as Iterator>::Item == U
impl<B, I, F> Iterator for Map<I, F> where I: Iterator, F: FnMut(<I as Iterator>::Item), <F as FnMut(<I as Iterator>::Item)>::Output == B
impl<I, P> Iterator for Filter<I, P> where I: Iterator, P: FnMut(&<I as Iterator>::Item), <P as FnMut(&<I as Iterator>::Item)>::Output == bool
impl<B, I, F> Iterator for FilterMap<I, F> where I: Iterator, F: FnMut(<I as Iterator>::Item), <F as FnMut(<I as Iterator>::Item)>::Output == Option<B>
impl<I> Iterator for Enumerate<I> where I: Iterator
impl<I> Iterator for Peekable<I> where I: Iterator
impl<I, P> Iterator for SkipWhile<I, P> where I: Iterator, P: FnMut(&<I as Iterator>::Item), <P as FnMut(&<I as Iterator>::Item)>::Output == bool
impl<I, P> Iterator for TakeWhile<I, P> where I: Iterator, P: FnMut(&<I as Iterator>::Item), <P as FnMut(&<I as Iterator>::Item)>::Output == bool
impl<I> Iterator for Skip<I> where I: Iterator
impl<I> Iterator for Take<I> where I: Iterator
impl<A, B, I, St, F> Iterator for Scan<I, St, F> where I: Iterator, <I as Iterator>::Item == A, F: FnMut(&mut St, A), <F as FnMut(&mut St, A)>::Output == Option<B>
impl<I, U, F> Iterator for FlatMap<I, U, F> where I: Iterator, U: Iterator, F: FnMut(<I as Iterator>::Item), <F as FnMut(<I as Iterator>::Item)>::Output == U
impl<I> Iterator for Fuse<I> where I: Iterator
impl<I, F> Iterator for Inspect<I, F> where I: Iterator, F: FnMut(&<I as Iterator>::Item), <F as FnMut(&<I as Iterator>::Item)>::Output == ()
impl<A, St, F> Iterator for Unfold<St, F> where F: FnMut(&mut St), <F as FnMut(&mut St)>::Output == Option<A>
impl<A> Iterator for Counter<A> where A: Add<A>, A: Clone, <A as Add<A>>::Output == A
impl<A> Iterator for Range<A> where A: Int, A: ToPrimitive
impl<A> Iterator for RangeInclusive<A> where A: Int, A: ToPrimitive
impl<A> Iterator for RangeStep<A> where A: Int
impl<A> Iterator for RangeStepInclusive<A> where A: Int
impl<A> Iterator for Range<A> where A: Int
impl<A> Iterator for RangeFrom<A> where A: Int
impl<A> Iterator for Repeat<A> where A: Clone
impl<A> Iterator for Item<A>
impl<'a, A> Iterator for Iter<'a, A>
impl<'a, A> Iterator for IterMut<'a, A>
impl<A> Iterator for IntoIter<A>
impl<'a, T> Iterator for Iter<'a, T>
impl<'a, T> Iterator for IterMut<'a, T>
impl<T> Iterator for IntoIter<T>
impl<'a, T> Iterator for Iter<'a, T>
impl<'a, T> Iterator for IterMut<'a, T>
impl<'a, T, P> Iterator for Split<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<'a, T, P> Iterator for SplitMut<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<T, I> Iterator for GenericSplitN<I> where I: SplitIter, <I as Iterator>::Item == T
impl<'a, T, P> Iterator for SplitN<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<'a, T, P> Iterator for RSplitN<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<'a, T, P> Iterator for SplitNMut<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<'a, T, P> Iterator for RSplitNMut<'a, T, P> where P: FnMut(&T), <P as FnMut(&T)>::Output == bool
impl<'a, T> Iterator for Windows<'a, T>
impl<'a, T> Iterator for Chunks<'a, T>
impl<'a, T> Iterator for ChunksMut<'a, T>
impl<'a> Iterator for Chars<'a>
impl<'a> Iterator for CharIndices<'a>
impl<'a> Iterator for Bytes<'a>
impl<'a, Sep> Iterator for CharSplits<'a, Sep> where Sep: CharEq
impl<'a, Sep> Iterator for CharSplitsN<'a, Sep> where Sep: CharEq
impl<'a> Iterator for MatchIndices<'a>
impl<'a> Iterator for SplitStr<'a>
impl<'a, P> Iterator for Split<'a, P> where P: CharEq
impl<'a, P> Iterator for SplitTerminator<'a, P> where P: CharEq
impl<'a, P> Iterator for SplitN<'a, P> where P: CharEq
impl<'a, P> Iterator for RSplitN<'a, P> where P: CharEq
impl<'a> Iterator for Lines<'a>
impl<'a> Iterator for LinesAny<'a>
impl<I> Iterator for Box<I> where I: Iterator, I: ?Sized
impl<'a, T> Iterator for Iter<'a, T>
impl<T> Iterator for IntoIter<T>
impl<'a, T> Iterator for Drain<'a, T> where T: 'a
impl<'a> Iterator for Iter<'a>
impl<'a> Iterator for SetIter<'a>
impl<'a> Iterator for TwoBitPositions<'a>
impl<'a> Iterator for Union<'a>
impl<'a> Iterator for Intersection<'a>
impl<'a> Iterator for Difference<'a>
impl<'a> Iterator for SymmetricDifference<'a>
impl<T> Iterator for RawItems<T>
impl<K, V, E, Impl> Iterator for AbsTraversal<Impl> where Impl: TraversalImpl, <Impl as TraversalImpl>::Item == (K, V), <Impl as TraversalImpl>::Edge == E
impl<K, V, E, T> Iterator for AbsIter<T> where T: DoubleEndedIterator, <T as Iterator>::Item == TraversalItem<K, V, E>, T: Traverse<E>
impl<'a, K, V> Iterator for Iter<'a, K, V>
impl<'a, K, V> Iterator for IterMut<'a, K, V>
impl<K, V> Iterator for IntoIter<K, V>
impl<'a, K, V> Iterator for Keys<'a, K, V>
impl<'a, K, V> Iterator for Values<'a, K, V>
impl<'a, K, V> Iterator for Range<'a, K, V>
impl<'a, K, V> Iterator for RangeMut<'a, K, V>
impl<'a, T> Iterator for Iter<'a, T>
impl<T> Iterator for IntoIter<T>
impl<'a, T> Iterator for Range<'a, T>
impl<'a, T> Iterator for Difference<'a, T> where T: Ord
impl<'a, T> Iterator for SymmetricDifference<'a, T> where T: Ord
impl<'a, T> Iterator for Intersection<'a, T> where T: Ord
impl<'a, T> Iterator for Union<'a, T> where T: Ord
impl<'a, A> Iterator for Iter<'a, A>
impl<'a, A> Iterator for IterMut<'a, A>
impl<A> Iterator for IntoIter<A>
impl<E> Iterator for Iter<E> where E: CLike
impl<'a, T> Iterator for Iter<'a, T>
impl<'a, T> Iterator for IterMut<'a, T>
impl<T> Iterator for IntoIter<T>
impl<'a, T> Iterator for Drain<'a, T> where T: 'a
impl Iterator for ElementSwaps
impl<T> Iterator for Permutations<T> where T: Clone
impl<'a> Iterator for Decompositions<'a>
impl<'a> Iterator for Recompositions<'a>
impl<'a> Iterator for Utf16Units<'a>
impl<T> Iterator for IntoIter<T>
impl<'a, T> Iterator for Drain<'a, T>
impl<'a, V> Iterator for Iter<'a, V>
impl<'a, V> Iterator for IterMut<'a, V>
impl<'a, V> Iterator for Drain<'a, V>
impl<'a, V> Iterator for Keys<'a, V>
impl<'a, V> Iterator for Values<'a, V>
impl<V> Iterator for IntoIter<V>
impl<'a> Iterator for GraphemeIndices<'a>
impl<'a> Iterator for Graphemes<'a>
impl<'a> Iterator for Utf16Items<'a>
impl<I> Iterator for Utf16Encoder<I> where I: Iterator, <I as Iterator>::Item == char
impl<'a> Iterator for Words<'a>
impl Iterator for EscapeDefault
impl<'r, R: Reader> Iterator for Bytes<'r, R>
impl Iterator for Directories
impl<'r, T: Buffer> Iterator for Lines<'r, T>
impl<'r, T: Buffer> Iterator for Chars<'r, T>
impl<'a, T, A: ?Sized + Acceptor<T>> Iterator for IncomingConnections<'a, A>
impl<R: Read> Iterator for Bytes<R>
impl<R: Read> Iterator for Chars<R>
impl<B: BufRead> Iterator for Split<B>
impl<B: BufRead> Iterator for Lines<B>
impl Iterator for ReadDir
impl Iterator for WalkDir
impl Iterator for LookupHost
impl Iterator for Vars
impl Iterator for VarsOs
impl<'a> Iterator for SplitPaths<'a>
impl Iterator for Args
impl Iterator for ArgsOs
impl<'a> Iterator for Iter<'a>
impl<'a> Iterator for Components<'a>
impl<'a, T, R> Iterator for Generator<'a, T, R> where T: Rand, R: Rng
impl<'a, R> Iterator for AsciiGenerator<'a, R> where R: Rng
impl<'a, K, V> Iterator for Iter<'a, K, V>
impl<'a, K, V> Iterator for IterMut<'a, K, V>
impl<K, V> Iterator for IntoIter<K, V>
impl<'a, K, V> Iterator for Keys<'a, K, V>
impl<'a, K, V> Iterator for Values<'a, K, V>
impl<'a, K, V> Iterator for Drain<'a, K, V>
impl<'a, K> Iterator for Iter<'a, K>
impl<K> Iterator for IntoIter<K>
impl<'a, K> Iterator for Drain<'a, K>
impl<'a, T, S> Iterator for Intersection<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for Difference<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for Union<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, K, V> Iterator for Iter<'a, K, V>
impl<'a, K, V> Iterator for IterMut<'a, K, V>
impl<K, V> Iterator for IntoIter<K, V>
impl<'a, K, V> Iterator for Keys<'a, K, V>
impl<'a, K, V> Iterator for Values<'a, K, V>
impl<'a, K, V> Iterator for Drain<'a, K, V>
impl<'a, K> Iterator for Iter<'a, K>
impl<K> Iterator for IntoIter<K>
impl<'a, K> Iterator for Drain<'a, K>
impl<'a, T, S> Iterator for Intersection<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for Difference<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for SymmetricDifference<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T, S> Iterator for Union<'a, T, S> where T: Eq + Hash, S: HashState
impl<'a, T: Send + 'static> Iterator for Iter<'a, T>