#io-error #errno #extracting #extract

nightly get_errno

Extracting errno from std::io::Error

3 releases

Uses old Rust 2015

0.0.3 Feb 24, 2015
0.0.2 Feb 23, 2015
0.0.1 Feb 23, 2015

#11 in #errno

Download history 1/week @ 2024-02-19 25/week @ 2024-02-26 4/week @ 2024-03-11 66/week @ 2024-04-01

70 downloads per month

MIT license

2KB

get_errno

A way to extract errno from std::io::Error

Example

use std::io::Error;
use get_errno::get_errno;

println!("{}", get_errno(&Error::from_os_error(47)));
// Some(47)

println!("{}", get_errno(&Error::new(ErrorKind::Other, "description", None)));
// None

Status

Experimental

License

MIT

Dependencies

~5MB
~90K SLoC