tag | 52e65ea5dd4430bf3e97efcdcf50cad7aaa31675 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Jan 31 14:41:09 2025 -0800 |
object | 280ca1218ae28fc9f13457ac1605991e2b815457 |
aml_hef_351314220 (12777567,com.google.android.go.healthfitness,com.google.android.healthfitness)
commit | 280ca1218ae28fc9f13457ac1605991e2b815457 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun Sep 01 07:16:35 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sun Sep 01 07:16:35 2024 +0000 |
tree | d71f1188d7446cc0ecb1f8f2aa97926c66761ce0 | |
parent | 7b400deca4654c81777b2a1f6f83df3bbed44dbe [diff] | |
parent | 86bc70978cc75869a2f7d6b908a1233280eff183 [diff] |
Snap for 12306212 from 86bc70978cc75869a2f7d6b908a1233280eff183 to mainline-healthfitness-release Change-Id: I7e5c9f211beb1fe56c1a6c2da03d242df2399d70
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.