Module iter
Source - iterExperimental
- Creates a new closure that returns an iterator where each iteration steps the given
generator to the next
yield statement.
- Chain
- An iterator that links two iterators together, in a chain.
- Cloned
- An iterator that clones the elements of an underlying iterator.
- Copied
- An iterator that copies the elements of an underlying iterator.
- Cycle
- An iterator that repeats endlessly.
- Empty
- An iterator that yields nothing.
- Enumerate
- An iterator that yields the current count and the element during iteration.
- Filter
- An iterator that filters the elements of
iter with predicate. - FilterMap
- An iterator that uses
f to both filter and map elements from iter. - FlatMap
- An iterator that maps each element to an iterator, and yields the elements
of the produced iterators.
- Flatten
- An iterator that flattens one level of nesting in an iterator of things
that can be turned into iterators.
- FromFn
- An iterator where each iteration calls the provided closure
F: FnMut() -> Option<T>. - Fuse
- An iterator that yields
None forever after the underlying iterator
yields None once. - Inspect
- An iterator that calls a function with a reference to each element before
yielding it.
- Map
- An iterator that maps the values of
iter with f. - MapWhile
- An iterator that only accepts elements while
predicate returns Some(_). - Once
- An iterator that yields an element exactly once.
- OnceWith
- An iterator that yields a single element of type
A by
applying the provided closure F: FnOnce() -> A. - Peekable
- An iterator with a
peek() that returns an optional reference to the next
element. - Repeat
- An iterator that repeats an element endlessly.
- RepeatN
- An iterator that repeats an element an exact number of times.
- RepeatWith
- An iterator that repeats elements of type
A endlessly by
applying the provided closure F: FnMut() -> A. - Rev
- A double-ended iterator with the direction inverted.
- Scan
- An iterator to maintain state while iterating another iterator.
- Skip
- An iterator that skips over
n elements of iter. - SkipWhile
- An iterator that rejects elements while
predicate returns true. - StepBy
- An iterator for stepping iterators by a custom amount.
- Successors
- An iterator which, starting from an initial item,
computes each successive item from the preceding one.
- Take
- An iterator that only iterates over the first
n iterations of iter. - TakeWhile
- An iterator that only accepts elements while
predicate returns true. - Zip
- An iterator that iterates two other iterators simultaneously.
- ArrayChunksExperimental
- An iterator over
N elements of the iterator at a time. - ByRefSizedExperimental
- Like
Iterator::by_ref, but requiring Sized so it can forward generics. - FromCoroutineExperimental
- An iterator over the values yielded by an underlying coroutine.
- IntersperseExperimental
- An iterator adapter that places a separator between all elements.
- IntersperseWithExperimental
- An iterator adapter that places a separator between all elements.
- MapWindowsExperimental
- An iterator over the mapped windows of another iterator.
- DoubleEndedIterator
- An iterator able to yield elements from both ends.
- ExactSizeIterator
- An iterator that knows its exact length.
- Extend
- Extend a collection with the contents of an iterator.
- FromIterator
- Conversion from an
Iterator. - FusedIterator
- An iterator that always continues to yield
None when exhausted. - IntoIterator
- Conversion into an
Iterator. - Iterator
- A trait for dealing with iterators.
- Product
- Trait to represent types that can be created by multiplying elements of an
iterator.
- Sum
- Trait to represent types that can be created by summing up an iterator.
- StepExperimental
- Objects that have a notion of successor and predecessor operations.
- TrustedLenExperimental
- An iterator that reports an accurate length using size_hint.
- TrustedStepExperimental
- A type that upholds all invariants of
Step.
- chain
- Converts the arguments to iterators and links them together, in a chain.
- empty
- Creates an iterator that yields nothing.
- from_fn
- Creates an iterator with the provided closure
F: FnMut() -> Option<T> as its next method. - once
- Creates an iterator that yields an element exactly once.
- once_with
- Creates an iterator that lazily generates a value exactly once by invoking
the provided closure.
- repeat
- Creates a new iterator that endlessly repeats a single element.
- repeat_n
- Creates a new iterator that repeats a single element a given number of times.
- repeat_with
- Creates a new iterator that repeats elements of type
A endlessly by
applying the provided closure, the repeater, F: FnMut() -> A. - successors
- Creates an iterator which, starting from an initial item,
computes each successive item from the preceding one.
- zip
- Converts the arguments to iterators and zips them.
- from_coroutineExperimental
- Creates a new iterator where each iteration calls the provided coroutine.