Trait wgpu::core::hal_api::HalApi

pub trait HalApi: Api + 'static + WasmNotSendSync {
    const VARIANT: Backend;

    // Required methods
    fn create_instance_from_hal(
        name: &str,
        hal_instance: Self::Instance
    ) -> Instance;
    fn instance_as_hal(instance: &Instance) -> Option<&Self::Instance>;
    fn hub(global: &Global) -> &Hub<Self>;
    fn surface_as_hal(surface: &Surface) -> Option<&Self::Surface>;
}
Available on wgpu_core only.

Required Associated Constants§

Required Methods§

fn create_instance_from_hal( name: &str, hal_instance: Self::Instance ) -> Instance

fn instance_as_hal(instance: &Instance) -> Option<&Self::Instance>

fn hub(global: &Global) -> &Hub<Self>

fn surface_as_hal(surface: &Surface) -> Option<&Self::Surface>

Object Safety§

This trait is not object safe.

Implementors§

§

impl HalApi for wgpu::hal::api::Empty

§

const VARIANT: Backend = Backend::Empty

§

impl HalApi for wgpu::hal::api::Gles

Available on gles only.
§

const VARIANT: Backend = Backend::Gl

§

impl HalApi for wgpu::hal::api::Vulkan

Available on vulkan only.
§

const VARIANT: Backend = Backend::Vulkan