pub enum NavMenuPatch {
IconProgress(Vec<(usize, Option<f64>)>),
Selected(Option<usize>),
Items {
rows_changed: Option<Box<[usize]>>,
document_keys: Box<[String]>,
items: Vec<String>,
icons: Vec<Option<String>>,
badges: Vec<Option<String>>,
badge_icons: Vec<Option<String>>,
badge_tints: Vec<Option<Color>>,
sections: Vec<Option<String>>,
tints: Vec<Option<Color>>,
menus: Vec<Vec<MenuItem>>,
selected: Option<usize>,
},
}Variants§
IconProgress(Vec<(usize, Option<f64>)>)
Active icon overlays by row index: None spins, Some(0..=1) fills a circle. Rows absent from this complete snapshot have no overlay. Does not relayout rows. Currently rendered by AppKit/UIKit; other backends may ignore this decoration.
Selected(Option<usize>)
Programmatic highlight sync: toolkits apply without re-emitting SelectionChanged (the TextField from_native echo rule).
Items
The item set changed (data-driven nav().items(signal, …)): rebuild the rows
from these labels/icons, then apply selected (docs/navigation.md). Applied without
re-emitting SelectionChanged.
rows_changed is Some when the rows themselves are the ones already shown (same
keys, sections and row menus) and only these rows’ title, icon, tint or badge moved:
a count ticking, a language change. A backend updates those rows in place (a tab’s
badge, a menu item’s title) rather than rebuilding, which on most platforms re-lays
the bar and replays its selection animation; one that cannot rebuilds as for None.
Trait Implementations§
Source§fn clone(&self) -> NavMenuPatch
fn clone(&self) -> NavMenuPatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more