#errno #boom

errno

Cross-platform interface to the errno variable

15 releases

new 0.2.5 Mar 27, 2020
0.2.4 Jul 10, 2018
0.2.3 Feb 17, 2017
0.2.1 Dec 6, 2016
0.1.1 Mar 29, 2015

#5 in Operating systems

Download history 18539/week @ 2019-12-02 18271/week @ 2019-12-09 19407/week @ 2019-12-16 8442/week @ 2019-12-23 10308/week @ 2019-12-30 18310/week @ 2020-01-06 24578/week @ 2020-01-13 20365/week @ 2020-01-20 18886/week @ 2020-01-27 17446/week @ 2020-02-03 18452/week @ 2020-02-10 17005/week @ 2020-02-17 23097/week @ 2020-02-24 22328/week @ 2020-03-02 25852/week @ 2020-03-09 24043/week @ 2020-03-16

86,852 downloads per month
Used in 274 crates (84 directly)

MIT/Apache

12KB
204 lines

errno Build status Build status Cargo

Cross-platform interface to the errno variable. Works on Rust 1.13 or newer.

Documentation is available at https://docs.rs/errno.

Dependency

Add to your Cargo.toml:

[dependencies]
errno = "*"
libc = "*"

Examples

extern crate errno;
use errno::{Errno, errno, set_errno};

// Get the current value of errno
let e = errno();

// Set the current value of errno
set_errno(e);

// Extract the error code as an i32
let code = e.0;

// Display a human-friendly error message
println!("Error {}: {}", code, e);

lib.rs:

Cross-platform interface to the errno variable.

Dependencies

~34KB