#[non_exhaustive]pub enum GpuDeviceHandle {
DirectX11(NativeHandle),
DirectX12(NativeHandle),
Vulkan(NativeHandle),
Metal(NativeHandle),
WebGpu {
device_id: u64,
},
}Expand description
Native GPU device handle — owns the buffers submitted via GpuBufferHandle.
Mirrors GpuBufferHandle’s platform variants but names the device, not a
buffer (e.g. the ID3D11Device* that must own submitted DirectX11
textures). Facade configs (VideoEncoderConfig::gpu_device, …) use
Option<GpuDeviceHandle> — None means no Zero-Copy device was supplied.
#[non_exhaustive]: declared ahead of backend support, like
GpuBufferHandle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DirectX11(NativeHandle)
ID3D11Device*.
DirectX12(NativeHandle)
ID3D12Device*.
Vulkan(NativeHandle)
VkDevice (or wrapper token; layout decided in Linux ADR).
Metal(NativeHandle)
MTLDevice (Apple backends).
WebGpu
Browser / WASM GPUDevice host token (not a raw WASM pointer).
Trait Implementations§
Source§impl Clone for GpuDeviceHandle
impl Clone for GpuDeviceHandle
Source§fn clone(&self) -> GpuDeviceHandle
fn clone(&self) -> GpuDeviceHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GpuDeviceHandle
Source§impl Debug for GpuDeviceHandle
impl Debug for GpuDeviceHandle
impl Eq for GpuDeviceHandle
Source§impl Hash for GpuDeviceHandle
impl Hash for GpuDeviceHandle
Source§impl PartialEq for GpuDeviceHandle
impl PartialEq for GpuDeviceHandle
impl StructuralPartialEq for GpuDeviceHandle
Auto Trait Implementations§
impl Freeze for GpuDeviceHandle
impl RefUnwindSafe for GpuDeviceHandle
impl Send for GpuDeviceHandle
impl Sync for GpuDeviceHandle
impl Unpin for GpuDeviceHandle
impl UnsafeUnpin for GpuDeviceHandle
impl UnwindSafe for GpuDeviceHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more