#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

#151 in Operating systems

Download history 21/week @ 2024-08-17 7/week @ 2024-08-24 1/week @ 2024-08-31 147/week @ 2024-09-07 730/week @ 2024-09-14 532/week @ 2024-09-21 546/week @ 2024-09-28 467/week @ 2024-10-05 724/week @ 2024-10-12 964/week @ 2024-10-19 621/week @ 2024-10-26 647/week @ 2024-11-02 501/week @ 2024-11-09 524/week @ 2024-11-16 512/week @ 2024-11-23 469/week @ 2024-11-30

2,101 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

~165–490KB