pub struct BudgetState {
pub enabled: bool,
pub warmup_remaining: u16,
pub overload_score: u16,
pub recovery_samples: u16,
pub cooldown_remaining: u16,
pub smoothed_gpu_ms: Option<f32>,
pub reason: BudgetReason,
}Expand description
An allocation-free snapshot after the last accepted sample or reset.
Invalid observations leave every field unchanged. Counters count eligible
GPU observations, not simulation ticks, render frames without timings, or
elapsed time. See RenderBudget::observe for thresholds and reset rules.
Fields§
§enabled: boolWhether automatic quality changes are enabled.
warmup_remaining: u16Filter-seeding samples still needed, bounded by eight.
overload_score: u16Overload evidence, bounded by 30; a nonqualifying sample subtracts two.
recovery_samples: u16Consecutive recovery evidence, bounded by 180.
cooldown_remaining: u16Eligible samples still needed before another change, bounded by 120.
smoothed_gpu_ms: Option<f32>Exponentially smoothed GPU milliseconds, or None after history resets.
reason: BudgetReasonReason for the last accepted observation, toggle or explicit reset.
Trait Implementations§
Source§impl Clone for BudgetState
impl Clone for BudgetState
Source§fn clone(&self) -> BudgetState
fn clone(&self) -> BudgetState
Returns a duplicate of the value. Read more
1.0.0 · 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 BudgetState
impl Debug for BudgetState
Source§impl PartialEq for BudgetState
impl PartialEq for BudgetState
impl Copy for BudgetState
impl StructuralPartialEq for BudgetState
Auto Trait Implementations§
impl Freeze for BudgetState
impl RefUnwindSafe for BudgetState
impl Send for BudgetState
impl Sync for BudgetState
impl Unpin for BudgetState
impl UnwindSafe for BudgetState
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