pub enum AdapterPolicy {
Auto,
Performance,
Index(usize),
Name(String),
}Expand description
How the renderer’s adapter is chosen (ALPHA2_GPU_ADAPTER).
Variants§
Auto
Rank hardware adapters by GPU encode and decode, then high-performance order
(crate::rank_adapters); requests without video context rank by that order alone.
Performance
The first hardware adapter in the high-performance order, whatever it encodes or decodes.
Index(usize)
The adapter at this position of its backend’s enumeration.
Name(String)
The first whose name contains this, ignoring case.
Implementations§
Source§impl AdapterPolicy
impl AdapterPolicy
Sourcepub fn parse(value: Option<&str>) -> Self
pub fn parse(value: Option<&str>) -> Self
The policy value names; unset and empty give auto. Any other text that is not a number
is a name pin.
Sourcepub fn names(&self, index: usize, name: &str) -> bool
pub fn names(&self, index: usize, name: &str) -> bool
Whether this pin names the adapter at enumeration position index called name.
Sourcepub fn report_name(&self) -> String
pub fn report_name(&self) -> String
The policy as a capability report names it: auto, performance, index:<n> or
name:<text>.
Trait Implementations§
Source§impl Clone for AdapterPolicy
impl Clone for AdapterPolicy
Source§impl Debug for AdapterPolicy
impl Debug for AdapterPolicy
Source§impl Default for AdapterPolicy
impl Default for AdapterPolicy
impl Eq for AdapterPolicy
Source§impl PartialEq for AdapterPolicy
impl PartialEq for AdapterPolicy
impl StructuralPartialEq for AdapterPolicy
Auto Trait Implementations§
impl Forget for AdapterPolicy
impl Freeze for AdapterPolicy
impl Move for AdapterPolicy
impl RefUnwindSafe for AdapterPolicy
impl Send for AdapterPolicywhere
RawVecInner: Send,
impl Sync for AdapterPolicywhere
RawVecInner: Sync,
impl Unpin for AdapterPolicy
impl UnsafeUnpin for AdapterPolicy
impl UnwindSafe for AdapterPolicywhere
RawVecInner: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.