Module std::iter

Iterators.

Iterators provide an abstraction for types that can be used to access their elements one-by-one, for example in for loop. The most common examples are ranges and collections.

There is distinction between an iterable type and an iterator. Iterators are consumable objects that can only be used to iterate once. Iterable types are ones that can produce an iterator when needed.

Iterators can also be combined to create more complex types of iterators. See IteratorExt mixin for a reference of methods that can be used to combine iterators.

Protocols

Iterators.
Iterators that can be consumed from both ends.
Extension mixin for DoubleEndedIterator types.
Types that can be iterated.
Types that can produce an iterator over pointers to their elements.
Types that can produce an iterator over mutable pointers to their elements.
Extension mixin for Iterator types.

Structs

Reverse iterator.
Map iterator.
Iterator that takes elements while a predicate is true.
Iterator that skips elements until a predicate becomes false.
Filter map iterator.
Filter iterator.
Iterator that skips a specified number of elements.
Step by iterator.
Fused iterator.
Iterator that takes a specified number of elements.
Enumerate iterator.
Chain iterator.
Merge iterator.
Inspect iterator.
A group iterator for GroupByIterator.
Grouping iterator
A chunk yielded by ChunksIterator.
Chunking iterator
Peekable iterator
Zip iterator
Flatten iterator
An empty iterator.
A function wrapped in an iterator.
Iterator that repeats a value infinitely.
Iterator that yields a single value

Functions

Types