pub trait Instance<A: Api>:
Sized
+ WasmNotSend
+ WasmNotSync {
// Required methods
unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>;
unsafe fn create_surface(
&self,
display_handle: RawDisplayHandle,
window_handle: RawWindowHandle,
) -> Result<A::Surface, InstanceError>;
unsafe fn destroy_surface(&self, surface: A::Surface);
unsafe fn enumerate_adapters(&self) -> Vec<ExposedAdapter<A>>;
}
Required Methods§
unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>
unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle, ) -> Result<A::Surface, InstanceError>
unsafe fn destroy_surface(&self, surface: A::Surface)
unsafe fn enumerate_adapters(&self) -> Vec<ExposedAdapter<A>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.