#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

#148 in Operating systems

Download history 4/week @ 2024-08-26 250/week @ 2024-09-09 789/week @ 2024-09-16 551/week @ 2024-09-23 494/week @ 2024-09-30 619/week @ 2024-10-07 1018/week @ 2024-10-14 569/week @ 2024-10-21 584/week @ 2024-10-28 640/week @ 2024-11-04 508/week @ 2024-11-11 522/week @ 2024-11-18 509/week @ 2024-11-25 469/week @ 2024-12-02 510/week @ 2024-12-09

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