fn try_for_each<O, T>(self, operation: O) -> TryForEach<Self, O>
    where
        O: Fn(Self::Item) -> T + Clone + Send,
        T: Try<Ok = ()> + Send,
    {
        TryForEach::new(self, operation)
    }
/// Executes a fallible `operation` on each item produced by the iterator, in parallel.
///
/// If the `operation` returns `Result::Err` or `Option::None`, we will attempt to
/// stop processing the rest of the items in the iterator as soon as
/// possible, and we will return that terminating value.  Otherwise, we will
/// return an empty `Result::Ok(())` or `Option::Some(())`.  If there are
/// multiple errors in parallel, it is not specified which will be returned.
///
/// # Examples
///
/// ```
/// use asparit::*;
/// use std::io::{self, Write};
///
/// // This will stop iteration early if there's any write error, like
/// // having piped output get closed on the other end.
/// (0..100)
///     .into_par_iter()
///     .try_for_each(|x| writeln!(io::stdout(), "{:?}", x))
///     .exec()
///     .expect("expected no write errors");
/// ```
Executes a fallible `operation` on each item produced by the iterator, in parallel.
Executes a fallible ` operation ` on each item produced by the iterator in parallel .
fn try_for_each<O, T>(self, operation: O) -> TryForEach<Self, O>
    where
        O: Fn(Self::Item) -> T + Clone + Send,
        T: Try<Ok = ()> + Send,
    {
        TryForEach::new(self, operation)
    }
fn try_for_each < O , T > ( self , operation : O ) -> TryForEach < Self , O > where O : Fn ( Self :: Item ) -> T + Clone + Send , T : Try < Ok = ( ) > + Send , { TryForEach :: new ( self , operation ) }
Executes a fallible `operation` on each item produced by the iterator, in parallel.
Executes a fallible ` operation ` on each item produced by the iterator in parallel .
self
operation
O
self
operation
O
examples


This will stop iteration early if there's any write error, like
having piped output get closed on the other end.
This will stop iteration early if there ' s any write error like having piped output get closed on the other end .