tag | 68f078aaa2375431f5057dffd59bc83808295de5 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Jan 31 14:40:59 2025 -0800 |
object | a91cca3ff9a21a905fb5dc1a8ceb9c90aaf1c6cd |
aml_tet_351314140 (12767178,com.google.android.go.tethering,com.google.android.tethering)
commit | a91cca3ff9a21a905fb5dc1a8ceb9c90aaf1c6cd | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Sep 10 17:03:25 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Sep 10 17:03:25 2024 +0000 |
tree | d71f1188d7446cc0ecb1f8f2aa97926c66761ce0 | |
parent | 9d4fa1023b518e06ee94c186f9126af2dfa2cb53 [diff] | |
parent | 86bc70978cc75869a2f7d6b908a1233280eff183 [diff] |
Snap for 12346786 from 86bc70978cc75869a2f7d6b908a1233280eff183 to mainline-tethering-release Change-Id: I6968e16fc296951db5ff2ede1d704a1495572b32
Cross-platform interface to the errno
variable. Works on Rust 1.56 or newer.
Documentation is available at https://docs.rs/errno.
Add to your Cargo.toml
:
[dependencies] errno = "*"
std::io::Error
The standard library provides Error::last_os_error
which fetches errno
in the same way.
This crate provides these extra features:
#![no_std]
supportset_errno
functionextern crate errno; 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);
#![no_std]
Enable #![no_std]
support by disabling the default std
feature:
[dependencies] errno = { version = "*", default-features = false }
The Error
impl will be unavailable.