pub(crate) fn process_results<I, T, E, F, U>(iter: I, mut f: F) -> Result<U, E>
where
    I: Iterator<Item = Result<T, E>>,
    for<'a> F: FnMut(ResultShunt<'a, I, E>) -> U,
{
    let mut error = Ok(());
    let shunt = ResultShunt {
        iter,
        error: &mut error,
    };
    let value = f(shunt);
    error.map(|()| value)
}
/// Process the given iterator as if it yielded a `T` instead of a
/// `Result<T, _>`. Any errors will stop the inner iterator and
/// the overall result will be an error.
Process the given iterator as if it yielded a `T` instead of a
`Result`. Any errors will stop the inner iterator and
the overall result will be an error.
Process the given iterator as if it yielded a ` T ` instead of a ` Result ` . Any errors will stop the inner iterator and the overall result will be an error .
pub(crate) fn process_results<I, T, E, F, U>(iter: I, mut f: F) -> Result<U, E>
where
    I: Iterator<Item = Result<T, E>>,
    for<'a> F: FnMut(ResultShunt<'a, I, E>) -> U,
{
    let mut error = Ok(());
    let shunt = ResultShunt {
        iter,
        error: &mut error,
    };
    let value = f(shunt);
    error.map(|()| value)
}
pub ( crate ) fn process_results < I , T , E , F , U > ( iter : I , mut f : F ) -> Result < U , E > where I : Iterator < Item = Result < T , E > > , for < ' a > F : FnMut ( ResultShunt < ' a , I , E > ) -> U , { let mut error = Ok ( ( ) ) ; let shunt = ResultShunt { iter , error : & mut error , } ; let value = f ( shunt ) ; error . map ( | ( ) | value ) }
Process the given iterator as if it yielded a `T` instead of a
`Result<T, _>`.
Process the given iterator as if it yielded a ` T ` instead of a ` Result<T _ > ` .
iter
I
f
F