Skip to main content

Features

Struct Features 

Source
pub struct Features { /* private fields */ }
Expand description

Snapshot of exact feature records used to create a device.

Individual extension and unified core records are distinct representations; this snapshot does not invent equivalence between equal member names. Native type aliases share the same sType. Legacy base features are represented by PHYSICAL_DEVICE_FEATURES_2, including default-false base features.

Implementations§

Source§

impl Features

Source

pub fn values(&self) -> &[FeatureValue]

Input records follow chain order; legacy/default base features follow the chain. Members within each record follow official XML declaration order.

Source

pub fn unrecognized_structures(&self) -> &[StructureType]

Exact input records not recognized as feature records by this build. This includes ordinary non-feature device-create records. Their presence is not a feature claim, and their payload is never interpreted or retained.

Source

pub fn enabled(&self, structure: StructureType, member: &str) -> Option<bool>

Read an explicitly recorded member by its exact native representation. None means unrecorded/unknown, including alternate unified representations. A false value is an explicitly captured disabled bit, not inferred absence.

Source

pub fn require( &self, requirements: &[(StructureType, &'static str)], ) -> Result<(), CallError>

Admit a caller-declared set of exact feature-record requirements.

§Errors

Returns FeatureNotEnabled for the first disabled or unrecorded member. This checks enabled bits only; API/extension support, limits, native object state and argument-dependent valid usage remain separate obligations.

Trait Implementations§

Source§

impl Debug for Features

Source§

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

Formats the value using the given formatter. Read more

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.