pub enum MenuItem {
Command {
command: CommandId,
when: Option<WhenExpr>,
toggle: Option<MenuItemToggle>,
},
Label {
title: Arc<str>,
},
Separator,
Submenu {
title: Arc<str>,
when: Option<WhenExpr>,
items: Vec<MenuItem>,
},
SystemMenu {
title: Arc<str>,
menu_type: SystemMenuType,
},
}Variants§
Command
Label
A non-interactive, disabled menu entry with a custom label.
This is intended for placeholder and dynamic menu content where a CommandId is not
available (yet). Menu surfaces should render this as disabled text.
Separator
SystemMenu
A menu managed by the OS (e.g. the macOS Services menu).
In-window menu surfaces should ignore or render a disabled placeholder for these entries.
Trait Implementations§
impl Eq for MenuItem
impl StructuralPartialEq for MenuItem
Auto Trait Implementations§
impl Freeze for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItem
impl Sync for MenuItem
impl Unpin for MenuItem
impl UnsafeUnpin for MenuItem
impl UnwindSafe for MenuItem
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