pub enum PermanentGpuId {
Pci {
vendor_id: Option<u32>,
device_id: u32,
subsys_id: Option<u32>,
revision: Option<u32>,
},
Pnp(String),
Name(String),
Single,
}Expand description
The stable part of a GpuId. Every adapter enumerate_gpus reports carries one.
Variants§
Pci
PCI vendor/device, plus the subsystem/revision that distinguishes board variants.
Stable across restarts; two identical cards share it. None is a wildcard — ZED_DEVICE_ID
names a device only.
Fields
Pnp(String)
The Windows PnP device instance id — the one documented persistent per-adapter identity.
DXGI does not expose it; a later SetupAPI read fills it in.
Name(String)
The adapter/driver name, where the platform has nothing better. Best-effort: two identical cards share it.
Single
A platform with one GPU, or a backend that cannot enumerate: there is only “the GPU”.
Implementations§
Source§impl PermanentGpuId
impl PermanentGpuId
Sourcepub fn matches(&self, other: &PermanentGpuId) -> bool
pub fn matches(&self, other: &PermanentGpuId) -> bool
Whether an adapter’s permanent part is the one this id names.
An Option field that is None in self is a wildcard; one that is None in other and
required by self does not match, because the backend cannot confirm it.
Trait Implementations§
Source§impl Clone for PermanentGpuId
impl Clone for PermanentGpuId
Source§fn clone(&self) -> PermanentGpuId
fn clone(&self) -> PermanentGpuId
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PermanentGpuId
impl Debug for PermanentGpuId
Source§impl<'de> Deserialize<'de> for PermanentGpuId
impl<'de> Deserialize<'de> for PermanentGpuId
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PermanentGpuId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PermanentGpuId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PermanentGpuId
Source§impl Ord for PermanentGpuId
impl Ord for PermanentGpuId
Source§fn cmp(&self, other: &PermanentGpuId) -> Ordering
fn cmp(&self, other: &PermanentGpuId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PermanentGpuId
impl PartialEq for PermanentGpuId
Source§impl PartialOrd for PermanentGpuId
impl PartialOrd for PermanentGpuId
Source§impl Serialize for PermanentGpuId
impl Serialize for PermanentGpuId
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PermanentGpuId
Auto Trait Implementations§
impl Freeze for PermanentGpuId
impl RefUnwindSafe for PermanentGpuId
impl Send for PermanentGpuId
impl Sync for PermanentGpuId
impl Unpin for PermanentGpuId
impl UnsafeUnpin for PermanentGpuId
impl UnwindSafe for PermanentGpuId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> CustomStyleProperty for T
impl<T> CustomStyleProperty for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any so CustomStyles::get can recover the concrete type.Source§fn eq_property(&self, other: &(dyn CustomStyleProperty + 'static)) -> bool
fn eq_property(&self, other: &(dyn CustomStyleProperty + 'static)) -> bool
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more