iter-opt-filter 0.1.0

Adds an optional filter to iterators.
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 3 items with examples
  • Size
  • Source code size: 18.36 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.59 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ottermata/iter-opt-filter
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ottermata

This library adds the optional_filter which is provided for all [Iterators][Iterator] by the [IteratorOptionalFilterExt] extension trait.

The optional_filter takes an Option<fn(&item) -> bool>, which allows for easy conditional filtering. This however comes at a performance cost compared to a normal [filter][Iterator::filter] or the inner [Iterator] by itself. But it is generally faster than a Box<dyn Iterator>.

See examples on the optional_filter method.