Skip to main content

Capabilities

Struct Capabilities 

Source
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

Source

pub fn api_version(&self) -> u32

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

Source

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.

Source

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

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

Source

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

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

Source

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

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

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for Capabilities

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.