#[repr(i32)]
pub enum TypeFilter { KeepAll = 0, KeepNone = 1, KeepStructure = 2, KeepImportant = 3, }
Expand description

Type filtering flags

By default…

  • Most objects are kept (KeepAll)
  • Instruction caches, I/O and Misc objects are ignored (KeepNone).
  • Die and Group levels are ignored unless they bring structure (KeepStructure).

Note that group objects are also ignored individually (without the entire level) when they do not bring structure.

Variants§

§

KeepAll = 0

Keep all objects of this type

Cannot be set for ObjectType::Group (groups are designed only to add more structure to the topology).

§

KeepNone = 1

Ignore all objects of this type

The bottom-level type ObjectType::PU, the ObjectType::NUMANode type, and the top-level type ObjectType::Machine may not be ignored.

§

KeepStructure = 2

Only ignore objects if their entire level does not bring any structure

Keep the entire level of objects if at least one of these objects adds structure to the topology. An object brings structure when it has multiple children and it is not the only child of its parent.

If all objects in the level are the only child of their parent, and if none of them has multiple children, the entire level is removed.

Cannot be set for I/O and Misc objects since the topology structure does not matter there.

§

KeepImportant = 3

Only keep likely-important objects of the given type.

This is only useful for I/O object types.

For ObjectType::PCIDevice and ObjectType::OSDevice, it means that only objects of major/common kinds are kept (storage, network, OpenFabrics, CUDA, OpenCL, RSMI, NVML, and displays). Also, only OS devices directly attached on PCI (e.g. no USB) are reported.

For ObjectType::Bridge, it means that bridges are kept only if they have children.

This flag is equivalent to KeepAll for Normal, Memory and Misc types since they are likely important.

Trait Implementations§

source§

impl Arbitrary for TypeFilter

Available on crate feature proptest only.
§

type Parameters = ()

The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<Range<usize>, fn(_: usize) -> TypeFilter>

The type of Strategy used to generate values of type Self.
source§

fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
source§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
source§

impl Clone for TypeFilter

source§

fn clone(&self) -> TypeFilter

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 Debug for TypeFilter

source§

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

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

impl From<TypeFilter> for i32

source§

fn from(enum_value: TypeFilter) -> Self

Converts to this type from the input type.
source§

impl Hash for TypeFilter

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 PartialEq for TypeFilter

source§

fn eq(&self, other: &TypeFilter) -> 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 Sequence for TypeFilter

source§

const CARDINALITY: usize = 4usize

Number of values of type Self. Read more
source§

fn next(&self) -> Option<Self>

Returns value following *self or None if this was the end. Read more
source§

fn previous(&self) -> Option<Self>

Returns value preceding *self or None if this was the beginning. Read more
source§

fn first() -> Option<Self>

Returns the first value of type Self. Read more
source§

fn last() -> Option<Self>

Returns the last value of type Self. Read more
source§

impl TryFrom<i32> for TypeFilter

§

type Error = TryFromPrimitiveError<TypeFilter>

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

fn try_from(number: i32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
source§

impl TryFromPrimitive for TypeFilter

§

type Primitive = i32

§

type Error = TryFromPrimitiveError<TypeFilter>

source§

const NAME: &'static str = "TypeFilter"

source§

fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>

source§

impl Copy for TypeFilter

source§

impl Eq for TypeFilter

source§

impl StructuralPartialEq for TypeFilter

Auto Trait Implementations§

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, 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.
§

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

§

fn vzip(self) -> V