pub enum MenuItem {
Item(MenuItemSpec),
Separator,
Submenu {
id: MenuId,
label: String,
icon: Option<IconRole>,
items: Vec<MenuItem>,
},
}Expand description
An item or divider within a menu structure.
Variants§
Item(MenuItemSpec)
An actionable or checkable menu command.
Separator
A visual divider separating item groups.
A nested submenu grouping child items.
Implementations§
Source§impl MenuItem
impl MenuItem
Sourcepub fn item(spec: MenuItemSpec) -> Self
pub fn item(spec: MenuItemSpec) -> Self
Wraps a MenuItemSpec as a menu item.
Creates a submenu entry.
Trait Implementations§
impl Eq for MenuItem
Source§impl From<MenuItemSpec> for MenuItem
impl From<MenuItemSpec> for MenuItem
Source§fn from(spec: MenuItemSpec) -> Self
fn from(spec: MenuItemSpec) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for MenuItem
Auto Trait Implementations§
impl Forget for MenuItem
impl Freeze for MenuItem
impl Move for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItemwhere
RawVecInner: Send,
impl Sync for MenuItemwhere
RawVecInner: Sync,
impl Unpin for MenuItem
impl UnsafeUnpin for MenuItemwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<MenuItem>: UnsafeUnpin,
impl UnwindSafe for MenuItemwhere
RawVecInner: UnwindSafe,
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