cvt

Crates.iocvt
lib.rscvt
version0.1.2
sourcesrc
created_at2019-10-07 11:41:55.410762
updated_at2023-03-14 10:39:48.43143
descriptionExpose the cvt function from Rust libstd.
homepage
repositoryhttps://github.com/marmistrz/cvt
max_upload_size
id170556
size16,942
Marcin Mielniczuk (marmistrz)

documentation

README

cvt

Build Status Docs crates-io-badge

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.

Commit count: 9

cargo fmt