pub struct NavBarAction {
pub action: u64,
pub label: String,
pub icon: Option<String>,
}Expand description
A trailing action button on the navigation bar (docs/navigation.md) — the phones’ and
HarmonyOS’s stand-in for a desktop toolbar button, since those toolkits have no window
toolbar (Cap::Toolbar is Unsupported). Rendered upper-right on the nav bar by the
mobile backends (iOS rightBarButtonItem, Android/HarmonyOS a menu action); ignored by
desktop split presentations, which carry their commands in a real toolbar instead.
action is a menu-action dispatch id (register_menu_action): the backend emits
Event::MenuAction(action) when the button is tapped, and the tree runs the registered
closure. icon is a bundled image name (resolved via resolve_image_file, the same
convention as NavMenuProps::icons); label is its accessible name and tooltip.
Fields§
§action: u64§label: String§icon: Option<String>Trait Implementations§
Source§fn clone(&self) -> NavBarAction
fn clone(&self) -> NavBarAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> NavBarAction
fn default() -> NavBarAction
Returns the “default value” for a type. Read more
Source§fn eq(&self, other: &NavBarAction) -> bool
fn eq(&self, other: &NavBarAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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