pub struct Instance { /* private fields */ }
Expand description
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn new(backends: BackendBit) -> Self
pub fn new(backends: BackendBit) -> Self
Sourcepub fn enumerate_adapters(
&self,
backends: BackendBit,
) -> impl Iterator<Item = Adapter>
pub fn enumerate_adapters( &self, backends: BackendBit, ) -> impl Iterator<Item = Adapter>
Retrieves all available Adapter
s that match the given BackendBit
.
§Arguments
backends
- Backends from which to enumerate adapters.
Sourcepub fn request_adapter(
&self,
options: &RequestAdapterOptions<'_>,
) -> impl Future<Output = Option<Adapter>> + Send
pub fn request_adapter( &self, options: &RequestAdapterOptions<'_>, ) -> impl Future<Output = Option<Adapter>> + Send
Retrieves an Adapter
which matches the given RequestAdapterOptions
.
Some options are “soft”, so treated as non-mandatory. Others are “hard”.
If no adapters are found that suffice all the “hard” options, None
is returned.
Sourcepub unsafe fn create_surface<W: HasRawWindowHandle>(
&self,
window: &W,
) -> Surface
pub unsafe fn create_surface<W: HasRawWindowHandle>( &self, window: &W, ) -> Surface
Creates a surface from a raw window handle.
§Safety
- Raw Window Handle must be a valid object to create a surface upon.
Auto Trait Implementations§
impl Freeze for Instance
impl !RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin 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