pub struct MenuItem { /* private fields */ }Expand description
Implementations§
Source§impl MenuItem
impl MenuItem
Sourcepub fn new(label: impl Into<WidgetText>) -> Self
pub fn new(label: impl Into<WidgetText>) -> Self
Create a menu item with the given label.
Sourcepub fn shortcut(self, shortcut: impl Into<String>) -> Self
pub fn shortcut(self, shortcut: impl Into<String>) -> Self
Display a keyboard-shortcut hint on the right (informational only — the actual shortcut is not bound).
Trait Implementations§
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