pub struct AdapterCriteria {
pub device_type: Option<DeviceType>,
pub vendor: Option<u32>,
pub name_contains: Option<String>,
pub power: Option<PowerPreference>,
}Expand description
Criteria used by select_adapter.
Fields§
§device_type: Option<DeviceType>Prefer an adapter whose device_type matches.
vendor: Option<u32>Prefer an adapter whose vendor id matches.
name_contains: Option<String>Prefer an adapter whose name contains this substring (case-insensitive).
power: Option<PowerPreference>Prefer an adapter with this power policy.
Implementations§
Source§impl AdapterCriteria
impl AdapterCriteria
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Build criteria for a high-performance discrete GPU.
Trait Implementations§
Source§impl Clone for AdapterCriteria
impl Clone for AdapterCriteria
Source§fn clone(&self) -> AdapterCriteria
fn clone(&self) -> AdapterCriteria
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdapterCriteria
impl Debug for AdapterCriteria
Source§impl Default for AdapterCriteria
impl Default for AdapterCriteria
Source§fn default() -> AdapterCriteria
fn default() -> AdapterCriteria
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AdapterCriteria
impl RefUnwindSafe for AdapterCriteria
impl Send for AdapterCriteria
impl Sync for AdapterCriteria
impl Unpin for AdapterCriteria
impl UnsafeUnpin for AdapterCriteria
impl UnwindSafe for AdapterCriteria
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