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

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

#2833 in Rust patterns

Download history 573/week @ 2024-11-17 490/week @ 2024-11-24 704/week @ 2024-12-01 698/week @ 2024-12-08 625/week @ 2024-12-15 216/week @ 2024-12-22 152/week @ 2024-12-29 649/week @ 2025-01-05 653/week @ 2025-01-12 653/week @ 2025-01-19 763/week @ 2025-01-26 758/week @ 2025-02-02 612/week @ 2025-02-09 726/week @ 2025-02-16 680/week @ 2025-02-23 552/week @ 2025-03-02

2,591 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