pub trait Instance: VkHandle<Handle = VkInstance> {
// Provided methods
fn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction> { ... }
fn physical_device_count(&self) -> Result<u32> { ... }
fn enumerate_physical_devices(
&self,
sink: &mut [MaybeUninit<VkPhysicalDevice>],
) -> Result<u32> { ... }
fn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>> { ... }
fn enumerate_physical_devices_alloc(
&self,
) -> Result<Vec<PhysicalDeviceObject<&Self>>> { ... }
}Expand description
A Vulkan Instance interface
Provided Methodsยง
Sourcefn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction>
๐Deprecated: do not use this directly(this does not provide caching!)
fn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction>
Return a function pointer for a command
Sourcefn physical_device_count(&self) -> Result<u32>
fn physical_device_count(&self) -> Result<u32>
Counts the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
Sourcefn enumerate_physical_devices(
&self,
sink: &mut [MaybeUninit<VkPhysicalDevice>],
) -> Result<u32>
fn enumerate_physical_devices( &self, sink: &mut [MaybeUninit<VkPhysicalDevice>], ) -> Result<u32>
Enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
Sourcefn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>>
fn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>>
Lazyly enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORYVK_ERROR_INITIALIZATION_FAILED
Sourcefn enumerate_physical_devices_alloc(
&self,
) -> Result<Vec<PhysicalDeviceObject<&Self>>>
fn enumerate_physical_devices_alloc( &self, ) -> Result<Vec<PhysicalDeviceObject<&Self>>>
Enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORYVK_ERROR_INITIALIZATION_FAILED
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.