#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

#2184 in Rust patterns

Download history 101/week @ 2024-03-13 69/week @ 2024-03-20 38/week @ 2024-03-27 58/week @ 2024-04-03 54/week @ 2024-04-10 124/week @ 2024-04-17 69/week @ 2024-04-24 130/week @ 2024-05-01 138/week @ 2024-05-08 309/week @ 2024-05-15 215/week @ 2024-05-22 363/week @ 2024-05-29 414/week @ 2024-06-05 225/week @ 2024-06-12 218/week @ 2024-06-19 311/week @ 2024-06-26

1,281 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.3–1.9MB
~37K SLoC