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
impl Features
Sourcepub fn values(&self) -> &[FeatureValue]
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.
Sourcepub fn unrecognized_structures(&self) -> &[StructureType]
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.
Sourcepub fn enabled(&self, structure: StructureType, member: &str) -> Option<bool>
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.
Sourcepub fn require(
&self,
requirements: &[(StructureType, &'static str)],
) -> Result<(), CallError>
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.