gpu-handle-types 0.1.0

Typed, owned native GPU resource handles (Vulkan, D3D11/12, Metal, OpenGL, CUDA, OpenCL, DMA-BUF, IOSurface, AHardwareBuffer, WebGPU, ...), cross-API sync points and video pixel formats, for passing GPU resources between libraries.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: MIT OR Apache-2.0

use gpu_handle_types::{Error, ErrorKind};

#[test]
fn kind_mapping() {
    // A deliberate cancellation is its own class — not a retryable failure.
    assert_eq!(Error::Cancelled.kind(), ErrorKind::Cancelled);
    assert_eq!(Error::Timeout.kind(), ErrorKind::Recoverable);
    assert_eq!(Error::NotSupported("x".into()).kind(), ErrorKind::Configuration);
    assert_eq!(Error::Fatal("x").kind(), ErrorKind::Fatal);
}