Trait rerun::external::eframe::egui_wgpu::wgpu::hal::Instance

pub trait Instance: Sized + WasmNotSendSync {
    type A: Api;

    // Required methods
    unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>;
    unsafe fn create_surface(
        &self,
        display_handle: RawDisplayHandle,
        window_handle: RawWindowHandle
    ) -> Result<<Self::A as Api>::Surface, InstanceError>;
    unsafe fn destroy_surface(&self, surface: <Self::A as Api>::Surface);
    unsafe fn enumerate_adapters(
        &self,
        surface_hint: Option<&<Self::A as Api>::Surface>
    ) -> Vec<ExposedAdapter<Self::A>>;
}

Required Associated Types§

type A: Api

Required Methods§

unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>

unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle ) -> Result<<Self::A as Api>::Surface, InstanceError>

unsafe fn destroy_surface(&self, surface: <Self::A as Api>::Surface)

unsafe fn enumerate_adapters( &self, surface_hint: Option<&<Self::A as Api>::Surface> ) -> Vec<ExposedAdapter<Self::A>>

surface_hint is only used by the GLES backend targeting WebGL2

Object Safety§

This trait is not object safe.

Implementors§

§

impl Instance for Context

§

type A = Api

§

impl Instance for Instance

§

type A = Api