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§
Trait Implementations§
Source§impl Clone for PermanentGpuId
impl Clone for PermanentGpuId
Source§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PermanentGpuId
Source§impl Ord for PermanentGpuId
impl Ord for PermanentGpuId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
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
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
Mutably borrows from an owned value. Read more
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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> ⓘ
Converts
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> ⓘ
Converts
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