errno-no-std

Crates.ioerrno-no-std
lib.rserrno-no-std
version0.2.2
sourcesrc
created_at2021-10-02 23:37:34.611653
updated_at2024-09-13 18:34:01.415874
descriptionCross-platform interface to the `errno` variable.
homepage
repositoryhttps://github.com/A1-Triard/errno-no-std
max_upload_size
id459585
size21,068
Warlock (A1-Triard)

documentation

https://docs.rs/errno-no-std/

README

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);
Commit count: 139

cargo fmt