Struct git_features::parallel::reduce::Stepwise[][src]

pub struct Stepwise<Reduce: Reduce> { /* fields omitted */ }

An iterator adaptor to allow running computations using in_parallel() in a step-wise manner, see the module docs for details.

Implementations

impl<Reduce: Reduce> Stepwise<Reduce>[src]

pub fn new<InputIter, ThreadStateFn, ConsumeFn, I, O, S>(
    input: InputIter,
    thread_limit: Option<usize>,
    new_thread_state: ThreadStateFn,
    consume: ConsumeFn,
    reducer: Reduce
) -> Self where
    InputIter: Iterator<Item = I> + Send + 'static,
    ThreadStateFn: Fn(usize) -> S + Send + Clone + 'static,
    ConsumeFn: Fn(I, &mut S) -> O + Send + Clone + 'static,
    Reduce: Reduce<Input = O> + 'static,
    I: Send + 'static,
    O: Send + 'static, 
[src]

Instantiate a new iterator and start working in threads. For a description of parameters, see in_parallel().

pub fn finalize(self) -> Result<Reduce::Output, Reduce::Error>[src]

Consume the iterator by finishing its iteration and calling Reduce::finalize().

Trait Implementations

impl<Reduce: Reduce> Drop for Stepwise<Reduce>[src]

impl<R: Reduce> Finalize for Stepwise<R>[src]

type Reduce = R

An implementation of Reduce

impl<Reduce: Reduce> Iterator for Stepwise<Reduce>[src]

type Item = Result<Reduce::FeedProduce, Reduce::Error>

The type of the elements being iterated over.

Auto Trait Implementations

impl<Reduce> !RefUnwindSafe for Stepwise<Reduce>

impl<Reduce> Send for Stepwise<Reduce> where
    Reduce: Send,
    <Reduce as Reduce>::Input: Send

impl<Reduce> !Sync for Stepwise<Reduce>

impl<Reduce> Unpin for Stepwise<Reduce> where
    Reduce: Unpin

impl<Reduce> !UnwindSafe for Stepwise<Reduce>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.