3 releases
| 0.1.2 | Mar 14, 2023 |
|---|---|
| 0.1.1 | Oct 11, 2019 |
| 0.1.0 | Oct 7, 2019 |
#2035 in Rust patterns
97,053 downloads per month
Used in 106 crates
(5 directly)
7KB
94 lines
cvt
This package exposes the cvt function used extensively by libstd to
convert platform-specific syscall error codes to std::io::Result.
Usually syscalls use return values for errors, the conventions differ. For instance,
on Unix 0 means success on Unix but failure on Windows.
While those conventions are not always followed, they usually are and
cvt is there to reduce the mental bookkeeping and make it easier to handle syscall errors.
The code was mostly copied over from Rust libstd, because the function is not public.
Dependencies
~4KB