servo/rust-errno

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

errno Build status Build status Cargo

Cross-platform interface to the errno variable.

Documentation is available at https://lambda.xyz/rust-errno/doc/errno/

Dependency

Add to your Cargo.toml:

endencies]
o = "*"
 = "*"
Examples
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);

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.