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
See examples on the optional_filter method.
Extension trait for adding the optional_filter method to iterators.