#errno

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

#1 in Operating systems

Download history 1509/week @ 2018-05-06 1976/week @ 2018-05-13 1853/week @ 2018-05-20 2047/week @ 2018-05-27 2075/week @ 2018-06-03 2187/week @ 2018-06-10 1938/week @ 2018-06-17 2106/week @ 2018-06-24 2460/week @ 2018-07-01 2233/week @ 2018-07-08 2774/week @ 2018-07-15 3073/week @ 2018-07-22 2335/week @ 2018-07-29

9,362 downloads per month

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.

MIT/Apache-2.0 license
  • No runtime deps

Reverse deps