Skip to main content

Hal

Trait Hal 

Source
pub trait Hal: 'static {
    type Context: HalContext<Hal = Self>;
    type Texture: HalTexture;
    type Fence: HalFence;

    const NAME: &'static str;
}
Expand description

A rendering backend, as a family of associated types.

Implementors are zero-sized markers; the types they name carry the work.

Required Associated Constants§

Source

const NAME: &'static str

Backend name, for logs and report fingerprints.

Required Associated Types§

Source

type Context: HalContext<Hal = Self>

Source

type Texture: HalTexture

Source

type Fence: HalFence

GPU completion, for callers that submit without waiting.

Named here because the DRM presentation path consumes one: it needs something to hand the kernel and something to decide when a frame slot is free again.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Hal for GlesHal

Source§

type Fence = GlesFence

A fence type exists to satisfy the trait, but nothing constructs one: deferred submission is not implemented here, so the default returns unsupported and this is never produced. Naming an uninhabited type is more honest than naming one that could be built but never signals.

Source§

const NAME: &'static str = "gles"

Source§

type Context = GlesContext

Source§

type Texture = GlesTexture

Source§

impl Hal for VulkanHal

Implementors§