#iterator #no-std #no-alloc

no-std discard-while

Get the first non-matching element, and the amount of discarded elements

7 releases

0.1.6 Apr 16, 2023
0.1.5 Apr 16, 2023

#2692 in Rust patterns

Download history 6/week @ 2024-02-19 4/week @ 2024-02-26 1/week @ 2024-03-11 115/week @ 2024-04-01

116 downloads per month

MIT license

7KB

Iterator utility for getting the first non-matching element, discarding any others, and the amount of discarded elements.

To use, either use discard_while::discard_while to get the function, or use discard_while::DiscardWhile to get the convenience trait.

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 getting the first non-matching element, discarding any others, and the amount of discarded elements.

To use, either use discard_while::discard_while to get the function, or use discard_while::DiscardWhile to get the convenience trait.

No runtime deps