#error #iterator #result #helper

gatherr

Helpers for collecting values and errors from result iterators

1 unstable release

0.1.0 Oct 4, 2020

#58 in #result

MIT/Apache

7KB
99 lines

This library provides helpers to convert iterators of results into results of collections of values or errors. The standard library provides FromIterator for Result directly, which serves many of the same goals as this crate. However, the standard library implementation only allows collecting into a result of all values or the first error. This crate differs in that all errors are preserved in the chosen collection type, allowing more complete error reporting with similar ergonomics.


lib.rs:

Helpers to convert iterators of results into results of collections preserving all errors, instead of just the first as FromIterator for Result does

No runtime deps