Combines an array of Results into a single Result containing an array of successful values.
If all results in the list are Ok, returns an Ok result containing an array of all successful values.
If any result in the list is Err, returns the first Err encountered.
This is useful for aggregating multiple fallible operations.
Type Parameters
T
The type of the successful value within each Result.
Combines an array of
Result
s into a singleResult
containing an array of successful values. If all results in the list areOk
, returns anOk
result containing an array of all successful values. If any result in the list isErr
, returns the firstErr
encountered. This is useful for aggregating multiple fallible operations.