Struct hwlocality::errors::RawHwlocError
source · pub struct RawHwlocError {
pub api: &'static str,
pub errno: Option<Errno>,
}
Expand description
Raw error emitted by hwloc functions that follow the usual convention
Hwloc APIs almost always error out by returning -1 if they return an integer, or a null pointer if they return a pointer.
They may additionally change the value of errno to report additional detail about what happened.
If no additional detail is provided by the hwloc documentation, we will assume this error handling convention and report errors using the present struct. Where possible errno values are clarified in the hwloc docs, we will assume they are the only errors that can occur, translate them into a higher-level Rust errors and panic if another errno value is observed.
Fields§
§api: &'static str
Hwloc entry point that failed
errno: Option<Errno>
Observed errno value, if errno was set
Note that even for entry points where hwloc is
documented to set errno, this member may be
None
on Windows. This happens because
Windows has multiple implementations of its
standard C library, called C RunTimes (CRTs),
and getting your application to be link
against the same CRT as your hwloc DLL is
basically a matter of fragile guesswork…
Trait Implementations§
source§impl Clone for RawHwlocError
impl Clone for RawHwlocError
source§fn clone(&self) -> RawHwlocError
fn clone(&self) -> RawHwlocError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RawHwlocError
impl Debug for RawHwlocError
source§impl Display for RawHwlocError
impl Display for RawHwlocError
source§impl Error for RawHwlocError
impl Error for RawHwlocError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl Hash for RawHwlocError
impl Hash for RawHwlocError
source§impl PartialEq for RawHwlocError
impl PartialEq for RawHwlocError
source§fn eq(&self, other: &RawHwlocError) -> bool
fn eq(&self, other: &RawHwlocError) -> bool
self
and other
values to be equal, and is used
by ==
.