use libc::{c_void, c_int, c_char, free}; use std::{fmt, str}; use std::ffi::CStr; use std::error::Error as StdError;
/// ALSA error /// /// Most ALSA functions can return a negative error code. /// If so, then that error code is wrapped into this `Error` struct. /// An Error is also returned in case ALSA returns a string that /// cannot be translated into Rust's UTF-8 strings. #[derive(Debug, Clone, PartialEq, Copy)] pubstruct Error(&'static str, nix::Error);
/// The function which failed. pubfn func(&self) -> &'static str { self.0 }
/// Underlying error /// /// Match this against the re-export of `nix::Error` in this crate, not against a specific version /// of the nix crate. The nix crate version might be updated with minor updates of this library. pubfn errno(&self) -> nix::Error { self.1 }
/// Underlying error /// /// Match this against the re-export of `nix::Error` in this crate, not against a specific version /// of the nix crate. The nix crate version might be updated with minor updates of this library. pubfn nix_error(&self) -> nix::Error { self.1 }
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.