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
Trait Implementations§
source§impl Clone for RawHwlocError
impl Clone for RawHwlocError
source§fn clone(&self) -> RawHwlocError
fn clone(&self) -> RawHwlocError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RawHwlocError
impl Eq for RawHwlocError
impl StructuralPartialEq for RawHwlocError
Auto Trait Implementations§
impl RefUnwindSafe for RawHwlocError
impl Send for RawHwlocError
impl Sync for RawHwlocError
impl Unpin for RawHwlocError
impl UnwindSafe for RawHwlocError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more