Enum hwlocality::memory::binding::MemoryBindingError

source ·
pub enum MemoryBindingError<OwnedSet: OwnedSpecializedBitmap> {
    AllocationFailed,
    BadFlags(FlagsError<MemoryBindingFlags>),
    BadSet(MemoryBoundObject, OwnedSet),
    BadTarget,
    MixedResults,
    Unsupported,
    Unknown,
}
Expand description

Errors that can occur when binding memory to NUMA nodes, querying bindings, or allocating (possibly bound) memory

Variants§

§

AllocationFailed

Memory allocation failed even before trying to bind

This error may only be returned by Topology::allocate_bound_memory() and Topology::binding_allocate_memory().

§

BadFlags(FlagsError<MemoryBindingFlags>)

Requested memory binding flags are not valid in this context

Not all memory binding flag combinations make sense, either in isolation or in the context of a particular binding method. Please cross-check the documentation of MemoryBindingFlags and the method you were trying to call for more information.

§

BadSet(MemoryBoundObject, OwnedSet)

Cannot bind to the target CPU or node set

Operating systems can have various restrictions here, e.g. can only bind to NUMA node.

This error should only be reported when trying to set memory bindings.

This error might not be reported if MemoryBindingFlags::STRICT is not set. Instead, the implementation is allowed to try using a smaller or larger set to make the operation succeed.

§

BadTarget

Cannot get/set the memory binding of a zero-sized memory region

§

MixedResults

Memory policies and nodesets vary from one thread to another

This error is returned when querying a process’ memory bindings with the flags PROCESS and STRICT specified. It means that the default memory policies and nodesets are not homogeneous across all threads of the target process.

§

Unsupported

The system does not support the specified action or policy

For example, some systems only allow binding memory on a per-thread basis, whereas other systems only allow binding memory for all threads in a process.

This error might not be reported if MemoryBindingFlags::STRICT is not set. Instead, the implementation is allowed to try to use a slightly different operation (with side-effects, binding more objects, etc.) when the requested operation is not exactly supported.

§

Unknown

Available on Windows only.

An error occured, but we don’t know which one

This may only happen on Windows. On this operating system, there are multiple versions of the standard library (called the C Run-Times or CRTs), and it is very easy to end up in a situation where your program links against a different CRT than your hwloc build, which breaks errno-based error reporting among other things.

Trait Implementations§

source§

impl<OwnedSet: Clone + OwnedSpecializedBitmap> Clone for MemoryBindingError<OwnedSet>

source§

fn clone(&self) -> MemoryBindingError<OwnedSet>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<OwnedSet: Debug + OwnedSpecializedBitmap> Debug for MemoryBindingError<OwnedSet>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<OwnedSet> Display for MemoryBindingError<OwnedSet>
where OwnedSet: Display + OwnedSpecializedBitmap,

source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<OwnedSet: OwnedSpecializedBitmap> Error for MemoryBindingError<OwnedSet>
where Self: Debug + Display,

source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<OwnedSet: OwnedSpecializedBitmap> From<MemoryBindingFlags> for MemoryBindingError<OwnedSet>

source§

fn from(value: MemoryBindingFlags) -> Self

Converts to this type from the input type.
source§

impl<OwnedSet: Hash + OwnedSpecializedBitmap> Hash for MemoryBindingError<OwnedSet>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<OwnedSet: PartialEq + OwnedSpecializedBitmap> PartialEq for MemoryBindingError<OwnedSet>

source§

fn eq(&self, other: &MemoryBindingError<OwnedSet>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OwnedSet: Eq + OwnedSpecializedBitmap> Eq for MemoryBindingError<OwnedSet>

source§

impl<OwnedSet: OwnedSpecializedBitmap> StructuralPartialEq for MemoryBindingError<OwnedSet>

Auto Trait Implementations§

§

impl<OwnedSet> Freeze for MemoryBindingError<OwnedSet>
where OwnedSet: Freeze,

§

impl<OwnedSet> RefUnwindSafe for MemoryBindingError<OwnedSet>
where OwnedSet: RefUnwindSafe,

§

impl<OwnedSet> Send for MemoryBindingError<OwnedSet>
where OwnedSet: Send,

§

impl<OwnedSet> Sync for MemoryBindingError<OwnedSet>
where OwnedSet: Sync,

§

impl<OwnedSet> Unpin for MemoryBindingError<OwnedSet>
where OwnedSet: Unpin,

§

impl<OwnedSet> UnwindSafe for MemoryBindingError<OwnedSet>
where OwnedSet: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V