Skip to main content

MultiTryAll

Trait MultiTryAll 

Source
pub trait MultiTryAll: Sized + Iterator {
    // Provided method
    fn try_for_all<F>(self, predicate: F) -> Result<(), FederationError>
       where F: FnMut(Self::Item) -> Result<(), FederationError> { ... }
}

Provided Methods§

Source

fn try_for_all<F>(self, predicate: F) -> Result<(), FederationError>
where F: FnMut(Self::Item) -> Result<(), FederationError>,

Apply predicate on all elements of the iterator, collecting all errors (if any).

  • Returns Ok(()), if all elements are Ok.
  • Otherwise, returns a FederationError with all errors.
  • Note: Not to be confused with try_for_each, which stops on the first error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§