Re-exported from core::iter::Iterator.
forall Self -> Item.
trait Iterator {
/// The next item, advancing the iterator; `None` once it has run out.
fn next(&it: Self) -> Option[Item];
}
A source of items, produced one per call to next.
Methods
method nextsource
fn next(&it: Self) -> Option[Item];
The next item, advancing the iterator; None once it has run out.
Implementors
instance Iterator[Range -> usize]source
instance Iterator[Range -> usize] { ... }
In std::iter.
range: the next number, and None from end on, however often it is asked.
instance Iterator[Map[I, In, Out, Env] -> Out]source
forall I, In, Out, Env where Iterator[I -> In], Copy[Env].
instance Iterator[Map[I, In, Out, Env] -> Out] { ... }
In std::iter.
map: the next item of the inner iterator, through f.
instance Iterator[Filter[I, In, Env] -> In]source
forall I, In, Env where Iterator[I -> In], Copy[In], Copy[Env].
instance Iterator[Filter[I, In, Env] -> In] { ... }
In std::iter.
filter: the next item of the inner iterator that pred keeps.
instance Iterator[Zip[IA, IB] -> Pair[ItemA, ItemB]]source
forall IA, IB, ItemA, ItemB where Iterator[IA -> ItemA], Iterator[IB -> ItemB], Copy[ItemA], Copy[ItemB].
instance Iterator[Zip[IA, IB] -> Pair[ItemA, ItemB]] { ... }
In std::iter.
zip: the next item of each, paired, until either runs out.
instance Iterator[Enumerate[I] -> Pair[usize, T]]source
forall I, T where Iterator[I -> T].
instance Iterator[Enumerate[I] -> Pair[usize, T]] { ... }
In std::iter.
enumerate: the next item with its index.
instance Iterator[Take[I] -> T]source
forall I, T where Iterator[I -> T].
instance Iterator[Take[I] -> T] { ... }
In std::iter.
take: the next item while any of the count is left.
instance Iterator[Skip[I] -> T]source
forall I, T where Iterator[I -> T], Copy[T].
instance Iterator[Skip[I] -> T] { ... }
In std::iter.
skip: the items after the first left.
instance Iterator[TakeWhile[I, T, Env] -> T]source
forall I, T, Env where Iterator[I -> T], Copy[T], Copy[Env].
instance Iterator[TakeWhile[I, T, Env] -> T] { ... }
In std::iter.
take_while: the next item while pred holds of it.
instance Iterator[Chain[IA, IB] -> T]source
forall IA, IB, T where Iterator[IA -> T], Iterator[IB -> T].
instance Iterator[Chain[IA, IB] -> T] { ... }
In std::iter.
chain: the items of a, then those of b.
instance Iterator[SliceIter![T, 'k, C, R] -> T]source
forall T, 'k, C, R where Copy[T], Sized[T].
instance Iterator[SliceIter![T, 'k, C, R] -> T] { ... }
In std::slice.
The slice's elements in order, read under the capability the iterator holds.
instance Iterator[Drain![K, V, 'k] -> Pair[K, V]]source
forall K, V, 'k where Sized[K], Sized[V].
instance Iterator[Drain![K, V, 'k] -> Pair[K, V]] { ... }
The drained entries, each moved out as Pair { a: key, b: value }.
instance Iterator[ListIter![T, 'k, C, R] -> T]source
forall T, 'k, C, R where Copy[T].
instance Iterator[ListIter![T, 'k, C, R] -> T] { ... }
The list's elements in order, read under the capability the iterator holds.
instance Iterator[VecIter![T, 'k] -> T]source
forall T, 'k where Copy[T], Sized[T].
instance Iterator[VecIter![T, 'k] -> T] { ... }
The vec's elements in order, copied out under its capability.
instance Iterator[OwnedVecIter![T] -> T]source
forall T where Copy[T], Sized[T].
instance Iterator[OwnedVecIter![T] -> T] { ... }
The vector's elements in order, copied out.