pub struct Instance {
pub name: String,
pub instance_per_backend: Vec<(Backend, Box<dyn DynInstance>)>,
pub flags: InstanceFlags,
}
Fields§
§name: String
§instance_per_backend: Vec<(Backend, Box<dyn DynInstance>)>
List of instances per backend.
The ordering in this list implies prioritization and needs to be preserved.
flags: InstanceFlags
Implementations§
source§impl Instance
impl Instance
pub fn new(name: &str, instance_desc: InstanceDescriptor) -> Self
pub fn raw(&self, backend: Backend) -> Option<&dyn DynInstance>
sourcepub unsafe fn as_hal<A: HalApi>(&self) -> Option<&A::Instance>
pub unsafe fn as_hal<A: HalApi>(&self) -> Option<&A::Instance>
§Safety
- The raw instance handle returned must not be manually destroyed.
pub fn enumerate_adapters(&self, backends: Backends) -> Vec<Adapter>
pub fn request_adapter( &self, desc: &RequestAdapterOptions<&Surface>, backends: Backends, ) -> Result<Adapter, RequestAdapterError>
Trait Implementations§
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