#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

#214 in Operating systems

Download history 493/week @ 2024-11-13 525/week @ 2024-11-20 504/week @ 2024-11-27 476/week @ 2024-12-04 529/week @ 2024-12-11 406/week @ 2024-12-18 308/week @ 2024-12-25 276/week @ 2025-01-01 169/week @ 2025-01-08 5/week @ 2025-01-15 8/week @ 2025-01-22 18/week @ 2025-01-29 17/week @ 2025-02-05 15/week @ 2025-02-12 22/week @ 2025-02-19 4/week @ 2025-02-26

60 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