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 [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!)Available on crate feature Implements
only.
fn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction>
Implements
only.Return a function pointer for a command
Sourcefn physical_device_count(&self) -> Result<u32>
Available on crate feature Implements
only.
fn physical_device_count(&self) -> Result<u32>
Implements
only.Counts the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
Sourcefn enumerate_physical_devices(
&self,
sink: &mut [VkPhysicalDevice],
) -> Result<u32>
Available on crate feature Implements
only.
fn enumerate_physical_devices( &self, sink: &mut [VkPhysicalDevice], ) -> Result<u32>
Implements
only.Enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
Sourcefn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>>
Available on crate features Implements
and alloc
only.
fn iter_physical_devices(&self) -> Result<IterPhysicalDevices<'_, Self>>
Implements
and alloc
only.Lazyly enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_INITIALIZATION_FAILED
Sourcefn enumerate_physical_devices_alloc(
&self,
) -> Result<Vec<PhysicalDeviceObject<&Self>>>
Available on crate features Implements
and alloc
only.
fn enumerate_physical_devices_alloc( &self, ) -> Result<Vec<PhysicalDeviceObject<&Self>>>
Implements
and alloc
only.Enumerates the physical devices accessible to a Vulkan instance
ยงFailures
On failure, this command returns
VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_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.