Module iter

Module iter 

Source
Available on crate feature iter only.
Expand description

Const equivalent of iterators with a specific next function signature.

The docs for ConstIntoIter has more information on const equivalents of IntoIterator and Iterator.

Re-exports§

pub use crate::polymorphism::kinds::IsIntoIterKind;
pub use crate::polymorphism::kinds::IsIteratorKind;
pub use crate::polymorphism::kinds::IsStdKind;

Modules§

iterator_dsl
Documentation on the iterator DSL that some konst::iter macros support.

Macros§

collect_const
Collects an iterator constant into an array
eval
Emulates iterator method chains, by expanding to equivalent code.
for_each
Iterates over all elements of an iterator, const equivalent of Iterator::for_each
into_iter
Macro for converting ConstIntoIter implementors into const iterators.

Structs§

IntoIterWrapper
Wrapper for ConstIntoIter implementors, that defines different methods depending on the value of K.
Repeat
Const analog of core::iter::Repeat, constructed by repeat.
RepeatN
Const analog of core::iter::RepeatN, constructed by repeat_n.

Traits§

ConstIntoIter
Const analog of the IntoIterator trait.
ConstIntoIterKind
Trait for the types that are assignable to ConstIntoIter::Kind
Step
Trait for all the types that ranges can iterate over.

Functions§

coerce
Coerces the argument to a type that has a .const_into_iter() method
repeat
Const analog of core::iter::repeat, except that this requires the repeated value to impl Copy (instead of Clone).
repeat_n
Const analog of core::iter::repeat_n, except that this requires the repeated value to impl Copy (instead of Clone).

Type Aliases§

CoerceTo
Computes the type returned by coerce: