pub struct Context {
pub hardware: HardwareState,
pub phase: ExecutionPhase,
pub global_budget_multiplier: f32,
}Expand description
The complete context model used for strategic decision making.
Fields§
§hardware: HardwareStateObserved hardware state.
phase: ExecutionPhaseCurrent engine execution phase.
global_budget_multiplier: f32Global budget multiplier derived from thermal and battery state.
Applied to all frame budgets to implement graceful performance degradation. Ranges from 0.0 (emergency) to 1.0 (full performance).
| Condition | Multiplier |
|---|---|
| Cool + Mains | 1.0 |
| Warm | 0.9 |
| Battery Low | 0.8 |
| Throttling | 0.6 |
| Critical thermal or battery | 0.4 |
Implementations§
Source§impl Context
impl Context
Sourcepub fn refresh_budget_multiplier(&mut self)
pub fn refresh_budget_multiplier(&mut self)
Recomputes global_budget_multiplier from the current hardware state.
This should be called whenever hardware.thermal or hardware.battery changes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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