Skip to main content

TypedVulkanSinkStructure

Trait TypedVulkanSinkStructure 

Source
pub trait TypedVulkanSinkStructure: VulkanSinkStructure {
    const TYPE: VkStructureType;

    // Provided methods
    fn uninit_sink() -> MaybeUninit<Self>
       where Self: Sized { ... }
    fn try_from_generic(g: &GenericVulkanSinkStructure) -> Option<&Self>
       where Self: Sized { ... }
}
Expand description

Trait for Vulkan structures that have a known [crate::vk::VkStructureType] at compile time.

Required Associated Constants§

Source

const TYPE: VkStructureType

sType constant for this structure.

Provided Methods§

Source

fn uninit_sink() -> MaybeUninit<Self>
where Self: Sized,

Constructs an uninitialized cell for this structure, that is ready to pass the api

Source

fn try_from_generic(g: &GenericVulkanSinkStructure) -> Option<&Self>
where Self: Sized,

Cast structure ref only if sType matches

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.

Implementations on Foreign Types§

Source§

impl<T> TypedVulkanSinkStructure for &mut T

Source§

const TYPE: VkStructureType = T::TYPE

Source§

impl<T> TypedVulkanSinkStructure for Box<T>

Source§

const TYPE: VkStructureType = T::TYPE

Implementors§

Source§

impl TypedVulkanSinkStructure for VkFormatProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkImageFormatProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkMemoryDedicatedRequirementsKHR

Available on crate feature VK_KHR_dedicated_allocation only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR

Source§

impl TypedVulkanSinkStructure for VkMemoryRequirements2KHR

Available on crate feature VK_KHR_get_memory_requirements2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR

Source§

impl TypedVulkanSinkStructure for VkPhysicalDeviceFeatures2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkPhysicalDeviceMemoryProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkPhysicalDeviceProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkPhysicalDeviceSynchronization2FeaturesKHR

Available on crate feature VK_KHR_synchronization2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES_KHR

Source§

impl TypedVulkanSinkStructure for VkQueueFamilyProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkSparseImageFormatProperties2KHR

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR

Source§

impl TypedVulkanSinkStructure for VkSparseImageMemoryRequirements2KHR

Available on crate feature VK_KHR_get_memory_requirements2 only.
Source§

const TYPE: VkStructureType = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR