tag | a24b6a119fbb8c49a91c4a3d0218c88ccbf2461a | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Fri Jan 31 14:32:23 2025 -0800 |
object | f224a13f8417b82c634f78825d3df8456272b850 |
aml_swc_351311020 (12756670,com.google.android.go.media.swcodec,com.google.android.media.swcodec)
commit | f224a13f8417b82c634f78825d3df8456272b850 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Aug 31 12:16:11 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Sat Aug 31 12:16:11 2024 +0000 |
tree | d71f1188d7446cc0ecb1f8f2aa97926c66761ce0 | |
parent | b42f87ac16d863806569afd52f9402cebb457889 [diff] | |
parent | 86bc70978cc75869a2f7d6b908a1233280eff183 [diff] |
Snap for 12305673 from 86bc70978cc75869a2f7d6b908a1233280eff183 to mainline-media-swcodec-release Change-Id: I0f55c8a3f842dd0dd43552ad5c8d621cfb3c1d3a
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.