#[non_exhaustive]pub struct MenuLabels {
pub roles: HashMap<MenuRole, String>,
pub edit_menu: Option<String>,
pub window_menu: Option<String>,
pub delete: Option<String>,
}Expand description
The translated labels sent by the core to desktop backends for the
menus NSH builds. These follow the app’s language (nsh/i18n); apps
override individual menu items through their existing label field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.roles: HashMap<MenuRole, String>Role labels; %{app} is replaced with the app name on macOS.
The title of the standard menu bar’s Edit menu ("Edit").
The title of the standard menu bar’s Window menu ("Window").
delete: Option<String>The Delete item of a text field’s edit menu, where NSH shows its own
("Delete").
Implementations§
Trait Implementations§
Source§impl Clone for MenuLabels
impl Clone for MenuLabels
Source§impl Debug for MenuLabels
impl Debug for MenuLabels
Source§impl Default for MenuLabels
impl Default for MenuLabels
Source§impl PartialEq for MenuLabels
impl PartialEq for MenuLabels
impl StructuralPartialEq for MenuLabels
Auto Trait Implementations§
impl Forget for MenuLabels
impl Freeze for MenuLabels
impl Move for MenuLabels
impl RefUnwindSafe for MenuLabels
impl Send for MenuLabels
impl Sync for MenuLabels
impl Unpin for MenuLabels
impl UnsafeUnpin for MenuLabelswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(MenuRole, String)>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for MenuLabels
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