Skip to main content

TryFoldAll

Trait TryFoldAll 

Source
pub trait TryFoldAll<T>: Iterator<Item = T> + Sized {
    // Provided method
    fn try_fold_all<Acc, E: Error + From<Vec<E>>, F>(
        self,
        init: Acc,
        f: F,
    ) -> Result<Acc, E>
       where F: FnMut(Acc, T) -> (Acc, Option<E>) { ... }
}

Provided Methods§

Source

fn try_fold_all<Acc, E: Error + From<Vec<E>>, F>( self, init: Acc, f: F, ) -> Result<Acc, E>
where F: FnMut(Acc, T) -> (Acc, Option<E>),

Fold the results, returning the accumulated value if all succeeded, or packing all errors if any failed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, I: Iterator<Item = T>> TryFoldAll<T> for I