Module iter

Source
Description

Lazy iteration protocol and adapter types.

Defines the Iterator trait (the @lang(iterator) item) and two concrete wrapper records: CharsIter for Str codepoint iteration and Peekable for one-slot lookahead over any underlying Iterator.

Data Types

Records

CharsIter

Lazy character iterator over a Str.

Abstractions

Traits

Iterator

Lazy, stateful element-at-a-time iteration protocol.

Peekable

Lookahead protocol for iterators that support inspecting the next

Functions

Functions

chars-iter

Construct a CharsIter over the given Str, starting at position 0.