Trait method lrs::iter::IteratorExt::filter

Returns a new iterator that filters elements via a function.

Syntax

fn filter<F>(self, f: F) -> Filter<F, Self>
   where F: FnMut(&<Self as Iterator>::Item) -> bool,

Arguments

NameDescription
f

The predicate.

Remarks

An element is passed through if f returns true.