Struct accurate::sum::SumConsumer
[−]
[src]
pub struct SumConsumer<Acc>(_);
Adapts a ParallelSumAccumulator
into a Consumer
Trait Implementations
impl<Acc: Copy> Copy for SumConsumer<Acc>
[src]
impl<Acc: Clone> Clone for SumConsumer<Acc>
[src]
fn clone(&self) -> SumConsumer<Acc>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<Acc: Debug> Debug for SumConsumer<Acc>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<Acc, F> Consumer<F> for SumConsumer<Acc> where
Acc: ParallelSumAccumulator<F>,
F: Zero + Send,
[src]
Acc: ParallelSumAccumulator<F>,
F: Zero + Send,
type Folder = SumFolder<Acc>
The type of folder that this consumer can be converted into.
type Reducer = AddReducer
The type of reducer that is produced if this consumer is split.
type Result = Acc
The type of result that this consumer will ultimately produce.
fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer)
[src]
Divide the consumer into two consumers, one processing items 0..index
and one processing items from index..
. Also produces a reducer that can be used to reduce the results at the end. Read more
fn into_folder(self) -> Self::Folder
[src]
Convert the consumer into a folder that can consume items sequentially, eventually producing a final result. Read more
fn full(&self) -> bool
[src]
Hint whether this Consumer
would like to stop processing further items, e.g. if a search has been completed. Read more
impl<Acc, F> UnindexedConsumer<F> for SumConsumer<Acc> where
Acc: ParallelSumAccumulator<F>,
F: Zero + Send,
[src]
Acc: ParallelSumAccumulator<F>,
F: Zero + Send,
fn split_off_left(&self) -> Self
[src]
Splits off a "left" consumer and returns it. The self
consumer should then be used to consume the "right" portion of the data. (The ordering matters for methods like find_first -- values produced by the returned value are given precedence over values produced by self
.) Once the left and right halves have been fully consumed, you should reduce the results with the result of to_reducer
. Read more
fn to_reducer(&self) -> Self::Reducer
[src]
Creates a reducer that can be used to combine the results from a split consumer. Read more
Auto Trait Implementations
impl<Acc> Send for SumConsumer<Acc> where
Acc: Send,
Acc: Send,
impl<Acc> Sync for SumConsumer<Acc> where
Acc: Sync,
Acc: Sync,