Crate step_count

source ·
Expand description

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

Traits

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

Functions

  • 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.
  • 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).
  • 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.
  • 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).