Rust iterator extensions to operate on Results effectively.
try_map_all
and, for now, its friend try_map_all_opt
Applies a closure on all items of the iterator until one fails (or all succeed).
Arguments:
f: fallible mapping function
Returns: The iterator of all successes, or the first failure.
Examples
Useful for propagating failures from within closures with ? operator:
or for Options:
try_all
Ensures that all items of the iterator are Ok, otherwise returns the first failure.
Returns: The iterator of all successes, or the first failure.
Examples:
Useful for propagating failures from within closures with ? operator