pub struct WidgetRefreshConfig {
pub enabled: bool,
pub staleness_window_ms: u64,
pub starve_ms: u64,
pub max_starved_per_frame: usize,
pub max_drop_fraction: f32,
pub weight_priority: f32,
pub weight_staleness: f32,
pub weight_focus: f32,
pub weight_interaction: f32,
pub starve_boost: f32,
pub min_cost_us: f32,
}Expand description
Configuration for widget refresh selection under render budget.
Defaults are conservative and deterministic:
- enabled: true
- staleness_window_ms: 1_000
- starve_ms: 3_000
- max_starved_per_frame: 2
- max_drop_fraction: 1.0 (disabled)
- weights: priority 1.0, staleness 0.5, focus 0.75, interaction 0.5
- starve_boost: 1.5
- min_cost_us: 1.0
Fields§
§enabled: boolEnable budgeted widget refresh selection.
staleness_window_ms: u64Staleness decay window (ms) used to normalize staleness scores.
starve_ms: u64Staleness threshold that triggers starvation guard (ms).
max_starved_per_frame: usizeMaximum number of starved widgets to force in per frame.
max_drop_fraction: f32Maximum fraction of non-essential widgets that may be dropped. Set to 1.0 to disable the guardrail.
weight_priority: f32Weight for base priority signal.
weight_staleness: f32Weight for staleness signal.
weight_focus: f32Weight for focus boost.
weight_interaction: f32Weight for interaction boost.
starve_boost: f32Additive boost to value for starved widgets.
min_cost_us: f32Minimum cost (us) to avoid divide-by-zero.
Trait Implementations§
Source§impl Clone for WidgetRefreshConfig
impl Clone for WidgetRefreshConfig
Source§fn clone(&self) -> WidgetRefreshConfig
fn clone(&self) -> WidgetRefreshConfig
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 WidgetRefreshConfig
impl Debug for WidgetRefreshConfig
Auto Trait Implementations§
impl Freeze for WidgetRefreshConfig
impl RefUnwindSafe for WidgetRefreshConfig
impl Send for WidgetRefreshConfig
impl Sync for WidgetRefreshConfig
impl Unpin for WidgetRefreshConfig
impl UnsafeUnpin for WidgetRefreshConfig
impl UnwindSafe for WidgetRefreshConfig
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