Crate iter_fi

Crate iter_fi 

Source
Expand description

Boolean composable iterators.

This crate adds the iter_if method to all Iterators. If its condition is true, it calls a function and returns its result. Otherwise, it returns self.

§Is this useful?

I have no idea. I made this because I had kind-of-a-use-case for IterIf.

§Crate features

Both features are enabled by default.

  • branched: allows iteration over iterators with two different types and adds a dependency on either
  • std: disabling this will make the crate #[no_std]

Structs§

Branched
An iterator which yields T::Item if the original condition was true and F::Item if not.

Enums§

IterIf
An iterator which yields items from T if the original condition was true and F if not.

Traits§

IterFi
Boolean composable iterators.