#errno #boom

errno

Cross-platform interface to the errno variable

14 releases

0.2.4 Jul 10, 2018
0.2.3 Feb 17, 2017
0.2.1 Dec 6, 2016
0.2.0 Nov 20, 2016
0.1.1 Mar 29, 2015

#6 in Operating systems

Download history 5538/week @ 2019-01-20 5731/week @ 2019-01-27 6141/week @ 2019-02-03 9165/week @ 2019-02-10 9124/week @ 2019-02-17 12898/week @ 2019-02-24 8960/week @ 2019-03-03 9356/week @ 2019-03-10 11479/week @ 2019-03-17 8502/week @ 2019-03-24 20175/week @ 2019-03-31 26950/week @ 2019-04-07 14205/week @ 2019-04-14 34510/week @ 2019-04-21 32135/week @ 2019-04-28

103,554 downloads per month
Used in 163 crates (73 directly)

MIT/Apache

10KB
159 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

~587KB