pub struct Instance { /* private fields */ }Available on
gles and webgl only.Implementations§
Source§impl Instance
impl Instance
pub fn create_surface_from_canvas( &self, canvas: HtmlCanvasElement, ) -> Result<Surface, InstanceError>
pub fn create_surface_from_offscreen_canvas( &self, canvas: OffscreenCanvas, ) -> Result<Surface, InstanceError>
Trait Implementations§
Source§impl DynResource for Instance
impl DynResource for Instance
Source§impl Instance for Instance
impl Instance for Instance
type A = Api
unsafe fn init(desc: &InstanceDescriptor<'_>) -> Result<Self, InstanceError>
Source§unsafe fn enumerate_adapters(
&self,
surface_hint: Option<&Surface>,
) -> Vec<ExposedAdapter<Api>>
unsafe fn enumerate_adapters( &self, surface_hint: Option<&Surface>, ) -> Vec<ExposedAdapter<Api>>
surface_hint is only used by the GLES backend targeting WebGL2unsafe fn create_surface( &self, _display_handle: RawDisplayHandle, window_handle: RawWindowHandle, ) -> Result<Surface, InstanceError>
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more