chatora-errno
A thin Rust wrapper library around libc errno
interface.
Examples
use ;
// Clear current errno.
clear_errno;
// Get the current value of errno.
let errno: i32 = get_errno;
assert_eq!;
// Equivalent to `clear_errno()`.
set_errno;
// Get string description of an errno.
let err_string: String = describe_errno.unwrap;
assert_eq!;
assert_eq!;
Usage
To use chatora-errno
, add this to your Cargo.toml
:
[]
= "1.0.2"
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.