Handle

Trait Handle 

Source
pub trait Handle:
    Copy
    + Clone
    + Debug
    + PartialEq
    + Eq
    + Hash
    + Default
    + Sized {
    type Repr;

    const TYPE: ObjectType;

    // Required methods
    fn null() -> Self;
    fn from_raw(value: Self::Repr) -> Self;
    fn as_raw(self) -> Self::Repr;
    fn is_null(self) -> bool;
}
Expand description

A Vulkan handle type.

Required Associated Constants§

Source

const TYPE: ObjectType

The object type for this handle type.

Required Associated Types§

Source

type Repr

The underlying type for this handle type.

Required Methods§

Source

fn null() -> Self

Constructs a null instance of this handle type.

Source

fn from_raw(value: Self::Repr) -> Self

Constructs an instance of this handle type with the supplied underlying value.

Source

fn as_raw(self) -> Self::Repr

Gets the underlying value for this handle.

Source

fn is_null(self) -> bool

Returns whether this handle is a null handle.

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.

Implementors§

Source§

impl Handle for AccelerationStructureKHR

Source§

const TYPE: ObjectType = ObjectType::ACCELERATION_STRUCTURE_KHR

Source§

type Repr = u64

Source§

impl Handle for AccelerationStructureNV

Source§

const TYPE: ObjectType = ObjectType::ACCELERATION_STRUCTURE_NV

Source§

type Repr = u64

Source§

impl Handle for Buffer

Source§

const TYPE: ObjectType = ObjectType::BUFFER

Source§

type Repr = u64

Source§

impl Handle for BufferCollectionFUCHSIA

Source§

const TYPE: ObjectType = ObjectType::BUFFER_COLLECTION_FUCHSIA

Source§

type Repr = u64

Source§

impl Handle for BufferView

Source§

const TYPE: ObjectType = ObjectType::BUFFER_VIEW

Source§

type Repr = u64

Source§

impl Handle for CommandBuffer

Source§

const TYPE: ObjectType = ObjectType::COMMAND_BUFFER

Source§

type Repr = usize

Source§

impl Handle for CommandPool

Source§

const TYPE: ObjectType = ObjectType::COMMAND_POOL

Source§

type Repr = u64

Source§

impl Handle for CuFunctionNVX

Source§

const TYPE: ObjectType = ObjectType::CU_FUNCTION_NVX

Source§

type Repr = u64

Source§

impl Handle for CuModuleNVX

Source§

const TYPE: ObjectType = ObjectType::CU_MODULE_NVX

Source§

type Repr = u64

Source§

impl Handle for CudaFunctionNV

Source§

const TYPE: ObjectType = ObjectType::CUDA_FUNCTION_NV

Source§

type Repr = u64

Source§

impl Handle for CudaModuleNV

Source§

const TYPE: ObjectType = ObjectType::CUDA_MODULE_NV

Source§

type Repr = u64

Source§

impl Handle for DataGraphPipelineSessionARM

Source§

const TYPE: ObjectType = ObjectType::DATA_GRAPH_PIPELINE_SESSION_ARM

Source§

type Repr = u64

Source§

impl Handle for DebugReportCallbackEXT

Source§

const TYPE: ObjectType = ObjectType::DEBUG_REPORT_CALLBACK_EXT

Source§

type Repr = u64

Source§

impl Handle for DebugUtilsMessengerEXT

Source§

const TYPE: ObjectType = ObjectType::DEBUG_UTILS_MESSENGER_EXT

Source§

type Repr = u64

Source§

impl Handle for DeferredOperationKHR

Source§

const TYPE: ObjectType = ObjectType::DEFERRED_OPERATION_KHR

Source§

type Repr = u64

Source§

impl Handle for DescriptorPool

Source§

const TYPE: ObjectType = ObjectType::DESCRIPTOR_POOL

Source§

type Repr = u64

Source§

impl Handle for DescriptorSet

Source§

const TYPE: ObjectType = ObjectType::DESCRIPTOR_SET

Source§

type Repr = u64

Source§

impl Handle for DescriptorSetLayout

Source§

const TYPE: ObjectType = ObjectType::DESCRIPTOR_SET_LAYOUT

Source§

type Repr = u64

Source§

impl Handle for DescriptorUpdateTemplate

Source§

const TYPE: ObjectType = ObjectType::DESCRIPTOR_UPDATE_TEMPLATE

Source§

type Repr = u64

Source§

impl Handle for Device

Source§

const TYPE: ObjectType = ObjectType::DEVICE

Source§

type Repr = usize

Source§

impl Handle for DeviceMemory

Source§

const TYPE: ObjectType = ObjectType::DEVICE_MEMORY

Source§

type Repr = u64

Source§

impl Handle for DisplayKHR

Source§

const TYPE: ObjectType = ObjectType::DISPLAY_KHR

Source§

type Repr = u64

Source§

impl Handle for DisplayModeKHR

Source§

const TYPE: ObjectType = ObjectType::DISPLAY_MODE_KHR

Source§

type Repr = u64

Source§

impl Handle for Event

Source§

const TYPE: ObjectType = ObjectType::EVENT

Source§

type Repr = u64

Source§

impl Handle for ExternalComputeQueueNV

Source§

const TYPE: ObjectType = ObjectType::EXTERNAL_COMPUTE_QUEUE_NV

Source§

type Repr = usize

Source§

impl Handle for Fence

Source§

const TYPE: ObjectType = ObjectType::FENCE

Source§

type Repr = u64

Source§

impl Handle for Framebuffer

Source§

const TYPE: ObjectType = ObjectType::FRAMEBUFFER

Source§

type Repr = u64

Source§

impl Handle for Image

Source§

const TYPE: ObjectType = ObjectType::IMAGE

Source§

type Repr = u64

Source§

impl Handle for ImageView

Source§

const TYPE: ObjectType = ObjectType::IMAGE_VIEW

Source§

type Repr = u64

Source§

impl Handle for IndirectCommandsLayoutEXT

Source§

const TYPE: ObjectType = ObjectType::INDIRECT_COMMANDS_LAYOUT_EXT

Source§

type Repr = u64

Source§

impl Handle for IndirectCommandsLayoutNV

Source§

const TYPE: ObjectType = ObjectType::INDIRECT_COMMANDS_LAYOUT_NV

Source§

type Repr = u64

Source§

impl Handle for IndirectExecutionSetEXT

Source§

const TYPE: ObjectType = ObjectType::INDIRECT_EXECUTION_SET_EXT

Source§

type Repr = u64

Source§

impl Handle for Instance

Source§

const TYPE: ObjectType = ObjectType::INSTANCE

Source§

type Repr = usize

Source§

impl Handle for MicromapEXT

Source§

const TYPE: ObjectType = ObjectType::MICROMAP_EXT

Source§

type Repr = u64

Source§

impl Handle for OpticalFlowSessionNV

Source§

const TYPE: ObjectType = ObjectType::OPTICAL_FLOW_SESSION_NV

Source§

type Repr = u64

Source§

impl Handle for PerformanceConfigurationINTEL

Source§

const TYPE: ObjectType = ObjectType::PERFORMANCE_CONFIGURATION_INTEL

Source§

type Repr = u64

Source§

impl Handle for PhysicalDevice

Source§

const TYPE: ObjectType = ObjectType::PHYSICAL_DEVICE

Source§

type Repr = usize

Source§

impl Handle for Pipeline

Source§

const TYPE: ObjectType = ObjectType::PIPELINE

Source§

type Repr = u64

Source§

impl Handle for PipelineBinaryKHR

Source§

const TYPE: ObjectType = ObjectType::PIPELINE_BINARY_KHR

Source§

type Repr = u64

Source§

impl Handle for PipelineCache

Source§

const TYPE: ObjectType = ObjectType::PIPELINE_CACHE

Source§

type Repr = u64

Source§

impl Handle for PipelineLayout

Source§

const TYPE: ObjectType = ObjectType::PIPELINE_LAYOUT

Source§

type Repr = u64

Source§

impl Handle for PrivateDataSlot

Source§

const TYPE: ObjectType = ObjectType::PRIVATE_DATA_SLOT

Source§

type Repr = u64

Source§

impl Handle for QueryPool

Source§

const TYPE: ObjectType = ObjectType::QUERY_POOL

Source§

type Repr = u64

Source§

impl Handle for Queue

Source§

const TYPE: ObjectType = ObjectType::QUEUE

Source§

type Repr = usize

Source§

impl Handle for RenderPass

Source§

const TYPE: ObjectType = ObjectType::RENDER_PASS

Source§

type Repr = u64

Source§

impl Handle for Sampler

Source§

const TYPE: ObjectType = ObjectType::SAMPLER

Source§

type Repr = u64

Source§

impl Handle for SamplerYcbcrConversion

Source§

const TYPE: ObjectType = ObjectType::SAMPLER_YCBCR_CONVERSION

Source§

type Repr = u64

Source§

impl Handle for Semaphore

Source§

const TYPE: ObjectType = ObjectType::SEMAPHORE

Source§

type Repr = u64

Source§

impl Handle for SemaphoreSciSyncPoolNV

Source§

const TYPE: ObjectType = ObjectType::SEMAPHORE_SCI_SYNC_POOL_NV

Source§

type Repr = u64

Source§

impl Handle for ShaderEXT

Source§

const TYPE: ObjectType = ObjectType::SHADER_EXT

Source§

type Repr = u64

Source§

impl Handle for ShaderModule

Source§

const TYPE: ObjectType = ObjectType::SHADER_MODULE

Source§

type Repr = u64

Source§

impl Handle for SurfaceKHR

Source§

const TYPE: ObjectType = ObjectType::SURFACE_KHR

Source§

type Repr = u64

Source§

impl Handle for SwapchainKHR

Source§

const TYPE: ObjectType = ObjectType::SWAPCHAIN_KHR

Source§

type Repr = u64

Source§

impl Handle for TensorARM

Source§

const TYPE: ObjectType = ObjectType::TENSOR_ARM

Source§

type Repr = u64

Source§

impl Handle for TensorViewARM

Source§

const TYPE: ObjectType = ObjectType::TENSOR_VIEW_ARM

Source§

type Repr = u64

Source§

impl Handle for ValidationCacheEXT

Source§

const TYPE: ObjectType = ObjectType::VALIDATION_CACHE_EXT

Source§

type Repr = u64

Source§

impl Handle for VideoSessionKHR

Source§

const TYPE: ObjectType = ObjectType::VIDEO_SESSION_KHR

Source§

type Repr = u64

Source§

impl Handle for VideoSessionParametersKHR

Source§

const TYPE: ObjectType = ObjectType::VIDEO_SESSION_PARAMETERS_KHR

Source§

type Repr = u64