Realm

vk::load · Structs · C1

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.

StRustExperimental

Stvk::load::Capabilities

pub struct Capabilities { /* private fields */ }
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.

Contract

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.

Methods and associated items

api_version

Method
pub fn api_version(&self) -> u32

Application API ceiling, capped by physical-device API for device snapshots. The ignored patch component is removed.

instance_api_version

Method
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.

instance_extensions

Method
pub fn instance_extensions(&self) -> impl ExactSizeIterator<Item = &CStr>

Exact enabled instance extension names, independently owned from create info.

device_extensions

Method
pub fn device_extensions(&self) -> Option<impl ExactSizeIterator<Item = &CStr>>

Enabled device extensions; absent on an instance-only snapshot.

features

Method
pub fn features(&self) -> Option<&Features>

Exact enabled feature records; absent on an instance-only snapshot.

new_from_instance_create_info

Method
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.

new_from_device_create_info

Method
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.

command_support

Method
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.

fmt

Method
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more