Expand description
This library adds the optional_filter which is provided for all Iterators 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 or the inner Iterator by itself.
But it is generally faster than a Box<dyn Iterator>
.
See examples on the optional_filter method.
Structs§
- Optional
Filter - An iterator that optionally filters the items with a predicate.
This
struct
is created by the optional_filter method provided by the IteratorOptionalFilterExt extension trait.
Traits§
- Iterator
Optional Filter Ext - Extension trait for adding the optional_filter method to iterators.