#iterator #no-std #no-alloc

nightly no-std step-count

Count items of an iterator with any Step type

2 releases

0.1.1 Apr 26, 2023
0.1.0 Apr 16, 2023

#326 in #no-alloc

33 downloads per month

MIT license

12KB
54 lines

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

Note that this library is unstable, as it depends on an unstable Rust feature, and requires nightly Rust to compile.

To use, import individual functions (listed in the documentation) or use discard_while::DiscardWhile to get the convenience trait that allows calling these functions as methods.

Documentation

This library is free software, you can use and re-use it under the terms of the MIT license. A copy of the license is provided in the source repository in the “LICENSE” file.


lib.rs:

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

No runtime deps