Trait timely::dataflow::operators::filter::Filter
[−]
[src]
pub trait Filter<D: Data> { fn filter<L: Fn(&D) -> bool + 'static>(&self, predicate: L) -> Self; }
Extension trait for filtering.
Required Methods
fn filter<L: Fn(&D) -> bool + 'static>(&self, predicate: L) -> Self
Returns a new instance of self
containing only records satisfying predicate
.
Examples
use timely::dataflow::operators::{ToStream, Filter, Inspect}; timely::example(|scope| { (0..10).to_stream(scope) .filter(|x| *x % 2 == 0) .inspect(|x| println!("seen: {:?}", x)); });