Struct jobsteal::iter::Filter [] [src]

pub struct Filter<T, F> {
    // some fields omitted
}

Filter ilterator adapter.

This filters each element by a given predicate.

Trait Implementations

impl<In: IntoIterator, T: Consumer<In>, F: Sync> Consumer<FilterBase<In>> for Filter<T, F> where F: Fn(&T::Item) -> bool
[src]

type Item = T::Item

fn consume<C: Callback<Self::Item>>(&self, i: FilterBase<In>, cb: C) -> C::Out

Consume the iterator, typically by passing it on to the parent consumer along with a callback which will receive a producer of items to transform. Read more

impl<T: Spliterator, F: Sync> Spliterator for Filter<T, F> where F: Fn(&T::Item) -> bool
[src]

type Item = T::Item

The item this iterator produces.

type Base = FilterBase<T::Base>

The splittable base data which this consists of.

type Consumer = Filter<T::Consumer, F>

A consumer which can act as an ad-hoc iterator adapter chain while being shared across threads. Read more

fn destructure(self) -> (Self::Base, Self::Consumer)

Destructure this iterator into a splittable base and a shareable consumer of that base. Read more

fn size_hint(&self) -> (usize, Option<usize>)

A lower bound and optional upper bound on the size of this iterator.

fn cloned<'a, T: 'a + Clone>(self) -> Cloned<Self> where Self: Spliterator<Item=&'a T>

Clone the items of this iterator to get owned copies.

fn enumerate(self) -> Enumerate<Self>

Enumerate items by their index.

fn filter<F: Sync>(self, pred: F) -> Filter<Self, F> where F: Fn(&Self::Item) -> bool

Filter items by some predicate.

fn flat_map<U, F: Sync>(self, flat_map: F) -> FlatMap<Self, F> where U: IntoIterator, F: Fn(Self::Item) -> U

Produce an iterator for each element, and then yield the elements of those iterators.

fn map<F: Sync, U>(self, map: F) -> Map<Self, F> where F: Fn(Self::Item) -> U

Map the items of this iterator to another type using the supplied function.

fn zip<B: IntoSpliterator>(self, other: B) -> Zip<Self, B::SplitIter>

Zip this iterator with another, combining their items in a tuple. Read more

fn any<P: Sync>(self, spawner: &Spawner, pred: P) -> bool where P: Fn(Self::Item) -> bool

Whether any of the elements fulfill the supplied predicate.

fn all<P: Sync>(self, spawner: &Spawner, pred: P) -> bool where P: Fn(Self::Item) -> bool

Whether all of the elements fulfill the supplied predicate.

fn for_each<F>(self, spawner: &Spawner, f: F) where F: Sync + Fn(Self::Item)

Consume this iterator, performing an action for each item.

fn collect<T: Send>(self, spawner: &Spawner) -> T where Self::Item: Send, T: FromIterator<Self::Item> + Combine + Send

Collect the items of this iterator into a combinable collection. Read more

fn fold<F: Sync>(self, spawner: &Spawner, initial: Self::Item, folder: F) -> Self::Item where F: Folder<Self::Item>, Self::Item: Send

Fold the items of the iterator together with the given operation and initial state. Read more

fn with_cost_mul(self, mul: f32) -> CostMul<Self>

Uses a cost multiplier for this iterator. Read more

impl<T: Clone, F: Clone> Clone for Filter<T, F>
[src]

fn clone(&self) -> Filter<T, F>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more