pub struct HardwareState {
pub thermal: ThermalStatus,
pub battery: BatteryLevel,
pub cpu_load: f32,
pub gpu_load: f32,
pub available_vram: Option<u64>,
pub total_vram: Option<u64>,
pub current_ram_bytes: Option<u64>,
pub memory_budget_bytes: Option<u64>,
}Expand description
Hardware context observed by the DCC.
Fields§
§thermal: ThermalStatusCurrent thermal status.
battery: BatteryLevelCurrent battery/power status.
cpu_load: f32Overall CPU load (0.0 to 1.0).
gpu_load: f32Overall GPU load (0.0 to 1.0).
available_vram: Option<u64>Available VRAM in bytes (if known).
total_vram: Option<u64>Total VRAM in bytes (if known).
current_ram_bytes: Option<u64>Currently-allocated system RAM in bytes, from the tracking allocator
(if a MemoryMonitor is feeding telemetry). None when unknown.
memory_budget_bytes: Option<u64>Developer-set system-RAM budget in bytes. When both this and
current_ram_bytes are known, the DCC derives memory_pressure and
degrades budgets as the ceiling approaches. None disables the signal
(no overhead, no effect) — it matters chiefly on memory-constrained
targets (console / mobile / iGPU).
Trait Implementations§
Source§impl Clone for HardwareState
impl Clone for HardwareState
Source§fn clone(&self) -> HardwareState
fn clone(&self) -> HardwareState
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 HardwareState
impl Debug for HardwareState
Source§impl Default for HardwareState
impl Default for HardwareState
Source§fn default() -> HardwareState
fn default() -> HardwareState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HardwareState
impl RefUnwindSafe for HardwareState
impl Send for HardwareState
impl Sync for HardwareState
impl Unpin for HardwareState
impl UnsafeUnpin for HardwareState
impl UnwindSafe for HardwareState
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