Name: rust-errno
Owner: Servo
Description: Cross-platform interface to the `errno` variable
Created: 2015-05-04 17:21:34.0
Updated: 2018-01-22 18:45:58.0
Pushed: 2015-04-05 02:10:08.0
Homepage: https://lambda.xyz/rust-errno/doc/errno/
Size: 1000
Language: Rust
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Cross-platform interface to the errno
variable.
Documentation is available at https://lambda.xyz/rust-errno/doc/errno/
Add to your Cargo.toml
:
endencies]
o = "*"
= "*"
rn crate errno;
errno::{Errno, errno, set_errno};
et the current value of errno
e = errno();
et the current value of errno
errno(e);
xtract the error code as an i32
code = e.0 as i32;
isplay a human-friendly error message
tln!("Error {}: {}", code, e);