pub struct MenuItem {
pub label: String,
pub icon: Option<&'static str>,
pub kbd: Option<String>,
pub danger: bool,
pub disabled: bool,
pub separator: bool,
}Expand description
One entry of a menu.
Fields§
§label: String§icon: Option<&'static str>An icon body (icons).
kbd: Option<String>A shortcut hint (Ctrl+K).
danger: boolRed (a destructive action).
disabled: boolGreyed, not pickable (no hit id).
separator: boolA divider line instead of an item.
Implementations§
Trait Implementations§
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 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