#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

#2251 in Rust patterns

Download history 327/week @ 2023-12-04 138/week @ 2023-12-11 168/week @ 2023-12-18 101/week @ 2024-01-01 159/week @ 2024-01-08 169/week @ 2024-01-15 162/week @ 2024-01-22 198/week @ 2024-01-29 159/week @ 2024-02-05 84/week @ 2024-02-12 112/week @ 2024-02-19 322/week @ 2024-02-26 72/week @ 2024-03-04 78/week @ 2024-03-11 90/week @ 2024-03-18

564 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–2MB
~37K SLoC