#io-error #helper #better #function #fat #file #file-path

vg_errortools

Helpers for better error legibility in std/tokio io errors and error handling in main functions

1 unstable release

0.1.0 Oct 20, 2022

#2845 in Rust patterns

Download history 163/week @ 2024-07-20 150/week @ 2024-07-27 429/week @ 2024-08-03 336/week @ 2024-08-10 546/week @ 2024-08-17 541/week @ 2024-08-24 303/week @ 2024-08-31 446/week @ 2024-09-07 335/week @ 2024-09-14 402/week @ 2024-09-21 328/week @ 2024-09-28 870/week @ 2024-10-05 1090/week @ 2024-10-12 732/week @ 2024-10-19 815/week @ 2024-10-26 1126/week @ 2024-11-02

3,953 downloads per month
Used in 3 crates

MIT license

7KB
75 lines

Documentation CI

vg_errortools - Small error utilities

This crate comprises mainly helpers for generating fat io errors - errors which carry the path of the file it failed with them. It solves the problem with not knowing which file was being processed in async/await powered logged utilities. Be aware, that the fat errors are cloning a PathBuf to store the affected file.

For more comfort in main functions a MainError is provided with a blanket implementation to allow using all errors with the ? Operator.

It's no rocket-science, but convenient.


lib.rs:

Tooling for better human readable errors

Dependencies

~0.2–6MB
~35K SLoC