pub struct Filter<Inner: ParallelIterator, F> { /* private fields */ }
Expand description
This struct is created by the filter()
method on ParallelIteratorExt
.
You most likely won’t need to interact with this struct directly, as it
implements the ParallelIterator
and ParallelIteratorExt
traits, but
it is nonetheless public because of the must_use
annotation.
Trait Implementations§
Source§impl<Inner: ParallelIterator, F> ParallelAdaptor for Filter<Inner, F>
impl<Inner: ParallelIterator, F> ParallelAdaptor for Filter<Inner, F>
Source§type Item = <Inner as ParallelIterator>::Item
type Item = <Inner as ParallelIterator>::Item
The type of items that this parallel iterator adaptor produces. Read more
Source§fn descriptor(
self,
) -> ParallelAdaptorDescriptor<Self::Item, Self::Inner, impl Fn(<Self::Inner as ParallelIterator>::Item) -> Option<Self::Item> + Sync>
fn descriptor( self, ) -> ParallelAdaptorDescriptor<Self::Item, Self::Inner, impl Fn(<Self::Inner as ParallelIterator>::Item) -> Option<Self::Item> + Sync>
Definition of the parallel adaptor.
Auto Trait Implementations§
impl<Inner, F> Freeze for Filter<Inner, F>
impl<Inner, F> RefUnwindSafe for Filter<Inner, F>where
Inner: RefUnwindSafe,
F: RefUnwindSafe,
impl<Inner, F> Send for Filter<Inner, F>
impl<Inner, F> Sync for Filter<Inner, F>
impl<Inner, F> Unpin for Filter<Inner, F>
impl<Inner, F> UnwindSafe for Filter<Inner, F>where
Inner: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ParallelIterator for Twhere
T: ParallelAdaptor,
impl<T> ParallelIterator for Twhere
T: ParallelAdaptor,
Source§type Item = <T as ParallelAdaptor>::Item
type Item = <T as ParallelAdaptor>::Item
The type of items that this parallel iterator produces. Read more
Source§fn upper_bounded_pipeline<Output, Accum>(
self,
init: impl Fn() -> Accum + Sync,
process_item: impl Fn(Accum, usize, <T as ParallelIterator>::Item) -> ControlFlow<Accum, Accum> + Sync,
finalize: impl Fn(Accum) -> Output + Sync,
reduce: impl Fn(Output, Output) -> Output,
) -> Outputwhere
Output: Send,
fn upper_bounded_pipeline<Output, Accum>(
self,
init: impl Fn() -> Accum + Sync,
process_item: impl Fn(Accum, usize, <T as ParallelIterator>::Item) -> ControlFlow<Accum, Accum> + Sync,
finalize: impl Fn(Accum) -> Output + Sync,
reduce: impl Fn(Output, Output) -> Output,
) -> Outputwhere
Output: Send,
Runs the pipeline defined by the given functions on this iterator. Read more
Source§fn iter_pipeline<Output>(
self,
accum: impl Accumulator<<T as ParallelIterator>::Item, Output> + Sync,
reduce: impl Accumulator<Output, Output>,
) -> Outputwhere
Output: Send,
fn iter_pipeline<Output>(
self,
accum: impl Accumulator<<T as ParallelIterator>::Item, Output> + Sync,
reduce: impl Accumulator<Output, Output>,
) -> Outputwhere
Output: Send,
Runs the pipeline defined by the given functions on this iterator. Read more
Source§fn pipeline<Output: Send, Accum>(
self,
init: impl Fn() -> Accum + Sync,
process_item: impl Fn(Accum, Self::Item) -> Accum + Sync,
finalize: impl Fn(Accum) -> Output + Sync,
reduce: impl Fn(Output, Output) -> Output,
) -> Output
fn pipeline<Output: Send, Accum>( self, init: impl Fn() -> Accum + Sync, process_item: impl Fn(Accum, Self::Item) -> Accum + Sync, finalize: impl Fn(Accum) -> Output + Sync, reduce: impl Fn(Output, Output) -> Output, ) -> Output
Runs the pipeline defined by the given functions on this iterator. Read more
Source§fn short_circuiting_pipeline<Output: Send, Accum, Break>(
self,
init: impl Fn() -> Accum + Sync,
process_item: impl Fn(Accum, Self::Item) -> ControlFlow<Break, Accum> + Sync,
finalize: impl Fn(ControlFlow<Break, Accum>) -> Output + Sync,
reduce: impl Fn(Output, Output) -> Output,
) -> Output
fn short_circuiting_pipeline<Output: Send, Accum, Break>( self, init: impl Fn() -> Accum + Sync, process_item: impl Fn(Accum, Self::Item) -> ControlFlow<Break, Accum> + Sync, finalize: impl Fn(ControlFlow<Break, Accum>) -> Output + Sync, reduce: impl Fn(Output, Output) -> Output, ) -> Output
Runs the pipeline defined by the given functions on this iterator. Read more
Source§impl<T> ParallelIteratorExt for Twhere
T: ParallelIterator,
impl<T> ParallelIteratorExt for Twhere
T: ParallelIterator,
Source§fn cmp<T>(self) -> Ordering
fn cmp<T>(self) -> Ordering
Compare the pairs of items produced by this iterator using
lexicographic
order. Read more
Source§fn cmp_by<T, U, F>(self, f: F) -> Ordering
fn cmp_by<T, U, F>(self, f: F) -> Ordering
Compare the pairs of items produced by this iterator using
lexicographic
order with the comparison function
f
. Read moreSource§fn cmp_by_key<T, A, F>(self, f: F) -> Ordering
fn cmp_by_key<T, A, F>(self, f: F) -> Ordering
Compare the pairs of items produced by this iterator using
lexicographic
order, after mapping them with
f
. Read moreSource§fn cmp_by_keys<T, U, A, F, G>(self, f: F, g: G) -> Ordering
fn cmp_by_keys<T, U, A, F, G>(self, f: F, g: G) -> Ordering
Compare the pairs of items produced by this iterator using
lexicographic
order, after mapping them with
f
and g
. Read moreSource§fn eq_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> bool
fn eq_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> bool
Source§fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F>
Source§fn find_first<F>(self, f: F) -> Option<Self::Item>
fn find_first<F>(self, f: F) -> Option<Self::Item>
Source§fn find_map_any<T, F>(self, f: F) -> Option<T>
fn find_map_any<T, F>(self, f: F) -> Option<T>
Source§fn find_map_first<T, F>(self, f: F) -> Option<T>
fn find_map_first<T, F>(self, f: F) -> Option<T>
Source§fn for_each_init<T, Init, F>(self, init: Init, f: F)
fn for_each_init<T, Init, F>(self, init: Init, f: F)
Runs
f
on each item of this iterator, together with a per-thread
mutable value returned by init
. Read moreSource§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Runs the function
f
on each item of this iterator in a pass-through
manner, returning a parallel iterator producing the original items. Read moreSource§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
Applies the function
f
to each item of this iterator, returning a
parallel iterator producing the mapped items. Read moreSource§fn map_init<I, Init, T, F>(self, init: Init, f: F) -> MapInit<Self, Init, F>
fn map_init<I, Init, T, F>(self, init: Init, f: F) -> MapInit<Self, Init, F>
Applies the function
f
to each item of this iterator, together with a
per-thread mutable value returned by init
, and returns a parallel
iterator producing the mapped items. Read moreSource§fn max_by_key<T, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<T, F>(self, f: F) -> Option<Self::Item>
Source§fn min_by_key<T, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<T, F>(self, f: F) -> Option<Self::Item>
Source§fn ne_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> bool
fn ne_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> bool
Source§fn partial_cmp<T, U>(self) -> Option<Ordering>
fn partial_cmp<T, U>(self) -> Option<Ordering>
Compare the pairs of items produced by this iterator using
lexicographic
order. Read more
Source§fn partial_cmp_by<T, U, F>(self, f: F) -> Option<Ordering>
fn partial_cmp_by<T, U, F>(self, f: F) -> Option<Ordering>
Compare the pairs of items produced by this iterator using
lexicographic
order with the comparison function
f
. Read moreSource§fn partial_cmp_by_key<T, A, F>(self, f: F) -> Option<Ordering>
fn partial_cmp_by_key<T, A, F>(self, f: F) -> Option<Ordering>
Compare the pairs of items produced by this iterator using
lexicographic
order, after mapping them with
f
. Read moreSource§fn partial_cmp_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> Option<Ordering>where
Self: ParallelIterator<Item = (T, U)>,
F: Fn(T) -> A + Sync,
G: Fn(U) -> B + Sync,
A: PartialOrd<B>,
fn partial_cmp_by_keys<T, U, A, B, F, G>(self, f: F, g: G) -> Option<Ordering>where
Self: ParallelIterator<Item = (T, U)>,
F: Fn(T) -> A + Sync,
G: Fn(U) -> B + Sync,
A: PartialOrd<B>,
Compare the pairs of items produced by this iterator using
lexicographic
order, after mapping them with
f
and g
. Read moreSource§fn product<T>(self) -> T
fn product<T>(self) -> T
Returns the product of the items produced by this iterator. Read more
Source§fn reduce<Init, F>(self, init: Init, f: F) -> Self::Item
fn reduce<Init, F>(self, init: Init, f: F) -> Self::Item
Reduces the items produced by this iterator into a single item, using
f
to collapse pairs of items. Read moreSource§fn try_for_each<R, F>(self, f: F) -> R
fn try_for_each<R, F>(self, f: F) -> R
Available on crate feature
nightly
only.Runs the fallible function
f
on each item of this parallel iterator,
breaking early and returning the failure in case of failure. Read moreSource§fn try_for_each_init<T, Init, R, F>(self, init: Init, f: F) -> R
fn try_for_each_init<T, Init, R, F>(self, init: Init, f: F) -> R
Available on crate feature
nightly
only.Runs the fallible function
f
on each item of this parallel iterator,
together with a per-thread mutable value returned by init
,
breaking early and returning the failure in case of failure. Read more