Trait dacite::VulkanObject
[−]
[src]
pub trait VulkanObject: Sized + Send + Sync + Clone + Debug { type NativeVulkanObject; fn id(&self) -> u64; fn as_native_vulkan_object(&self) -> Self::NativeVulkanObject; fn try_destroy(self) -> Result<(), TryDestroyError<Self>>; }
Associated Types
type NativeVulkanObject
Required Methods
fn id(&self) -> u64
Get the object id.
This function returns the same value as as_native_vulkan_object()
, but conveniently cast
to a u64
. This is useful for extensions like VK_EXT_debug_report
and
VK_EXT_debug_marker
, which use these to refer Vulkan objects.
Object ids (or more correctly, handles) come in two variants, dispatchable and
non-dispatchable. While dispatchable objects are actually pointers, and thus unique,
the same is not true for non-dispatchable objects. For instance, two Semaphore
s, created
independently of each other, might in fact have the same handle.
Additionally, handles of non-dispatchable objects are only ever meaningful, if their type
is known (whether it is i.e. a Semaphore
or some other type). This must be taken into
account, if handles are used to identify Vulkan objects.
Refer to the Vulkan specification (Object Model) for more information.
fn as_native_vulkan_object(&self) -> Self::NativeVulkanObject
fn try_destroy(self) -> Result<(), TryDestroyError<Self>>
Implementors
impl VulkanObject for Buffer
impl VulkanObject for BufferView
impl VulkanObject for CommandBuffer
impl VulkanObject for CommandPool
impl VulkanObject for DescriptorPool
impl VulkanObject for DescriptorSet
impl VulkanObject for DescriptorSetLayout
impl VulkanObject for Device
impl VulkanObject for DeviceMemory
impl VulkanObject for Event
impl VulkanObject for Fence
impl VulkanObject for Framebuffer
impl VulkanObject for Image
impl VulkanObject for ImageView
impl VulkanObject for Instance
impl VulkanObject for PhysicalDevice
impl VulkanObject for Pipeline
impl VulkanObject for PipelineCache
impl VulkanObject for PipelineLayout
impl VulkanObject for QueryPool
impl VulkanObject for Queue
impl VulkanObject for RenderPass
impl VulkanObject for Sampler
impl VulkanObject for Semaphore
impl VulkanObject for ShaderModule
impl VulkanObject for DebugReportCallbackExt
impl VulkanObject for DisplayKhr
impl VulkanObject for DisplayModeKhr
impl VulkanObject for SurfaceKhr
impl VulkanObject for SwapchainKhr