Crate step_count

Source
Expand description

Iterator utility for counting the number of iterations with an arbitrary type that implements the Step trait.

Traits§

StepCount
Convenience trait to allow using step_count* functions as methods. This trait is implemented for every Iterator.

Functions§

step_count
Consumes the iterator, counting the number of iterations. This uses the Step trait to keep track of the count of iterations. The count starts from the default value provided by the Default trait.
step_count_checked
Consumes the iterator, counting the number of iterations. This uses the Step trait to keep track of the count of iterations. The count starts from the default value provided by the Default trait. Returns None if the count exceeded the capcity of the count type (T).
step_count_from
Consumes the iterator, counting the number of iterations, starting from a given value. This uses the Step trait to keep track of the count of iterations.
step_count_from_checked
Consumes the iterator, counting the number of iterations, starting from a given value. This uses the Step trait to keep track of the count of iterations. Returns None if the count exceeded the capcity of the count type (T).