pub struct Capabilities { /* private fields */ }Expand description
Owned snapshot of the API version and extension names used at creation. Device snapshots inherit instance extensions and cap the API version by the selected physical device. Feature records are owned; no input pNext pointers are retained.
Implementations§
Source§impl Capabilities
impl Capabilities
Sourcepub fn api_version(&self) -> u32
pub fn api_version(&self) -> u32
Application API ceiling, capped by physical-device API for device snapshots. The ignored patch component is removed.
Sourcepub fn instance_api_version(&self) -> u32
pub fn instance_api_version(&self) -> u32
Application API ceiling capped by the queried instance implementation. Physical-device commands use their own API support, independently.
Sourcepub fn instance_extensions(&self) -> impl ExactSizeIterator<Item = &CStr>
pub fn instance_extensions(&self) -> impl ExactSizeIterator<Item = &CStr>
Exact enabled instance extension names, independently owned from create info.
Sourcepub fn device_extensions(&self) -> Option<impl ExactSizeIterator<Item = &CStr>>
pub fn device_extensions(&self) -> Option<impl ExactSizeIterator<Item = &CStr>>
Enabled device extensions; absent on an instance-only snapshot.
Sourcepub fn features(&self) -> Option<&Features>
pub fn features(&self) -> Option<&Features>
Exact enabled feature records; absent on an instance-only snapshot.
Sourcepub unsafe fn new_from_instance_create_info(
info: &InstanceCreateInfo,
implementation_version: u32,
) -> Result<Self, CallError>
pub unsafe fn new_from_instance_create_info( info: &InstanceCreateInfo, implementation_version: u32, ) -> Result<Self, CallError>
Capture external instance creation metadata without adopting a native handle.
§Errors
Reports invalid versions/name arrays or host allocation failure.
§Safety
Every reachable create-info pointer must be valid for its declared length.
When importing, this must describe the actual instance’s creation and
implementation_version must be the version of its instance implementation.
Sourcepub unsafe fn new_from_device_create_info(
&self,
info: &DeviceCreateInfo,
physical_version: u32,
) -> Result<Self, CallError>
pub unsafe fn new_from_device_create_info( &self, info: &DeviceCreateInfo, physical_version: u32, ) -> Result<Self, CallError>
Capture external device creation metadata without adopting a native handle.
§Errors
Reports a device snapshot used as parent, invalid metadata/chains or host allocation failure. No native allocation or feature query is performed.
§Safety
This snapshot must describe the actual parent instance. The create info must describe the actual logical device, and physical_version its selected physical device. All reachable records must be readable, aligned and valid for their sType; pointers are borrowed only until this constructor returns.
Sourcepub fn command_support(&self, name: &CStr) -> Option<CommandSupport>
pub fn command_support(&self, name: &CStr) -> Option<CommandSupport>
Evaluate registry version/extension requirements for an exact native name. Unknown names return None. Alias spellings have their own requirements; promotion never silently enables an extension spelling or replaces a PFN. Enabled does not guarantee a loaded pointer or feature-bit validity.