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
2,294 downloads per month
Used in 9 crates
(3 directly)
17KB
363 lines
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