#errno #error-message #unix #no-std

no-std errno-no-std

Cross-platform interface to the errno variable

13 releases

0.2.2 Sep 13, 2024
0.2.1 Feb 19, 2024
0.2.0 Oct 24, 2023
0.1.5 Jun 27, 2022
0.0.1 Oct 2, 2021

#153 in Operating systems

Download history 12/week @ 2024-08-09 28/week @ 2024-08-16 7/week @ 2024-08-23 1/week @ 2024-08-30 4/week @ 2024-09-06 805/week @ 2024-09-13 536/week @ 2024-09-20 540/week @ 2024-09-27 472/week @ 2024-10-04 707/week @ 2024-10-11 977/week @ 2024-10-18 589/week @ 2024-10-25 671/week @ 2024-11-01 505/week @ 2024-11-08 512/week @ 2024-11-15 513/week @ 2024-11-22

2,294 downloads per month
Used in 9 crates (3 directly)

MIT/Apache

17KB
363 lines

maintenance: actively developed

errno-no-std

Cross-platform interface to the errno variable.

An improved version of the errno crate.

Examples

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:

Feature flags

Dependencies

~170–490KB