tag | db2aa1d1718fca40c46bce680ce01b337507943c | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Jan 31 14:33:07 2025 -0800 |
object | 048b652441fffca15c783d7be6ab01a5e5245c67 |
aml_ads_351312060 (12761852,com.google.android.adservices,com.google.android.go.adservices)
commit | 048b652441fffca15c783d7be6ab01a5e5245c67 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Aug 28 17:46:38 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Aug 28 17:46:38 2024 +0000 |
tree | d71f1188d7446cc0ecb1f8f2aa97926c66761ce0 | |
parent | 86c7d6a9161957cbcee0bb1c463c65500fd2e1b6 [diff] | |
parent | 86bc70978cc75869a2f7d6b908a1233280eff183 [diff] |
Snap for 12289052 from 86bc70978cc75869a2f7d6b908a1233280eff183 to mainline-adservices-release Change-Id: I8e05fa98d3bc09fff8b5256adc8775de1c2ee842
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.