#error #collect #result #easy #handling

beau_collector

Collect up all errors into a single error

4 releases

0.2.1 May 6, 2020
0.2.0 May 4, 2020
0.1.1 May 3, 2020
0.1.0 May 3, 2020

#10 in #handling

Download history 572/week @ 2024-07-24 630/week @ 2024-07-31 425/week @ 2024-08-07 572/week @ 2024-08-14 688/week @ 2024-08-21 720/week @ 2024-08-28 608/week @ 2024-09-04 549/week @ 2024-09-11 528/week @ 2024-09-18 390/week @ 2024-09-25 390/week @ 2024-10-02 428/week @ 2024-10-09 558/week @ 2024-10-16 438/week @ 2024-10-23 376/week @ 2024-10-30 482/week @ 2024-11-06

1,980 downloads per month
Used in nu-completion-script

Custom license

10KB
147 lines

beau_collector

Build Status Latest Version Rust Documentation

Collect all the errors from an iterator of Results into a single Error.

The default behaviour of running collect::<Result<_, _>>() on an iterator of Results which have some Err variants in is to collect to the first Err found and throw away the other errors.

beau_collector is a simple solution for when you want to collect all the errors from an iterator of Results and are happy for them to be put into a single simple Error, where each error is on a newline within the string representation of that error.

A use case for this could be in a CLI tool where you want to collect all the errors and print them to stderr for the user to see them all at once.

Contributing

Please do. See issues. Pick one to fix, or raise a new one.

Dependencies

~595KB
~11K SLoC