pub struct Instance { /* private fields */ }Available on
gles and (windows_angle or non-Windows) and non-webgl only.Implementations§
Source§impl Instance
impl Instance
pub fn raw_display(&self) -> Display
Sourcepub fn egl_version(&self) -> (i32, i32)
pub fn egl_version(&self) -> (i32, i32)
Returns the version of the EGL display.
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>
unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle, ) -> Result<Surface, 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 WebGL2Auto Trait Implementations§
impl !Freeze for Instance
impl !RefUnwindSafe for Instance
impl Forget for Instance
impl Move for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instancewhere
InternalBitFlags: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const ArcInner<Instance<Dynamic<Library, EGL1_4>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Instance<Dynamic<Library, EGL1_4>>>>: UnsafeUnpin,
*mut c_void: UnsafeUnpin,
impl UnwindSafe for Instancewhere
InternalBitFlags: UnwindSafe,
Align1<u8>: UnwindSafe,
Arc<Instance<Dynamic<Library, EGL1_4>>>: UnwindSafe,
*mut c_void: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<I> DynInstance for Iwhere
I: Instance + DynResource,
impl<I> DynInstance for Iwhere
I: Instance + DynResource,
Source§unsafe fn create_surface(
&self,
display_handle: RawDisplayHandle,
window_handle: RawWindowHandle,
) -> Result<Box<dyn DynSurface>, InstanceError>
unsafe fn create_surface( &self, display_handle: RawDisplayHandle, window_handle: RawWindowHandle, ) -> Result<Box<dyn DynSurface>, InstanceError>
Dynamic version of Instance::create_surface
Source§unsafe fn enumerate_adapters(
&self,
surface_hint: Option<&(dyn DynSurface + 'static)>,
) -> Vec<DynExposedAdapter>
unsafe fn enumerate_adapters( &self, surface_hint: Option<&(dyn DynSurface + 'static)>, ) -> Vec<DynExposedAdapter>
Dynamic version of Instance::enumerate_adapters