pub enum BindingLevel {
RepaintOnly,
SubtreeRepaint,
Relayout,
Rebuild,
AccessibilityOnly,
}Expand description
Dirty-tracking granularity for a property binding. Determined by the primitive widget implementor, not the consumer.
Variants§
RepaintOnly
Visual-only change (color, opacity). Marks the widget for repaint; layout is skipped.
SubtreeRepaint
Visual-only change that propagates through the entire subtree.
Used by enabled_when so that flipping a single node’s
enabled_state marks the whole disabled subtree for repaint —
leaves like IconWidget resolve their role color from
crate::widget::PaintContext::effective_enabled, which the
paint walker computes by AND-ing ancestor enabled-states.
Without this propagation, only the bound node would repaint and
descendants would keep their stale enabled colors.
Relayout
Size-affecting change (text content, constraint value). Marks the widget for relayout and propagates upward through ancestors.
Rebuild
Data-model change requiring the widget’s build() to re-run.
Used by data-driven widgets (Repeater, ListView, TreeView) to trigger
a full rebuild of their child subtree when the underlying data changes.
AccessibilityOnly
Accessibility-tree change only. Flips WidgetTree::a11y_dirty without
touching repaint, layout, or rebuild flags. Orthogonal to the other
levels — widgets whose accessibility output depends on a signal that
does not visually affect the widget itself (e.g., a document_version
bumped by every text edit) bind at this level so AccessKit’s tree
rebuilds as soon as the underlying data changes, regardless of
whether the widget needs repainting.
Trait Implementations§
Source§impl Clone for BindingLevel
impl Clone for BindingLevel
Source§fn clone(&self) -> BindingLevel
fn clone(&self) -> BindingLevel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more