#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

#11 in Operating systems

Download history 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 15221/week @ 2019-05-05 34571/week @ 2019-05-12 35423/week @ 2019-05-19 42788/week @ 2019-05-26 30425/week @ 2019-06-02 53212/week @ 2019-06-09 25935/week @ 2019-06-16 13275/week @ 2019-06-23 9601/week @ 2019-06-30

103,554 downloads per month
Used in 212 crates (76 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

~33KB