pub trait CombineResults {
type Output;
// Required method
fn all_ok(self) -> Result<Self::Output>;
}Expand description
This trait is implemented for tuples and vectors, so it is possible to check multiple results,
and collect all errors before bailing out.
This will return errors from both compute_a and compute_b, if any:
let (a, b) = (compute_a(), compute_b()).all_ok()?