#[non_exhaustive]pub struct GpuInfo {
pub name: String,
pub vendor: Vendor,
pub total_bytes: u64,
pub free_bytes: Option<u64>,
pub used_bytes: Option<u64>,
}Expand description
A single detected GPU and its memory.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringHuman-readable name (e.g. "NVIDIA GeForce RTX 4090").
vendor: VendorHardware vendor.
total_bytes: u64Total memory in bytes. For discrete GPUs this is dedicated VRAM; for integrated/unified GPUs (Intel iGPUs, AMD APUs, Apple Silicon) it is the shared system-memory ceiling available to the GPU, not a dedicated pool.
free_bytes: Option<u64>Free device memory in bytes, when known.
used_bytes: Option<u64>Used device memory in bytes, when known.
Trait Implementations§
impl Eq for GpuInfo
impl StructuralPartialEq for GpuInfo
Auto Trait Implementations§
impl Freeze for GpuInfo
impl RefUnwindSafe for GpuInfo
impl Send for GpuInfo
impl Sync for GpuInfo
impl Unpin for GpuInfo
impl UnsafeUnpin for GpuInfo
impl UnwindSafe for GpuInfo
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