pub struct MenuItemBuilder { /* private fields */ }
Expand description
A builder type for MenuItem
Implementations§
Source§impl MenuItemBuilder
impl MenuItemBuilder
pub fn new() -> MenuItemBuilder
Sourcepub fn id(self, id: MenuId) -> MenuItemBuilder
pub fn id(self, id: MenuId) -> MenuItemBuilder
Set the id this menu item.
Sourcepub fn text<S>(self, text: S) -> MenuItemBuilder
pub fn text<S>(self, text: S) -> MenuItemBuilder
Set the text for this menu item.
See MenuItem::set_text
for more info.
Sourcepub fn enabled(self, enabled: bool) -> MenuItemBuilder
pub fn enabled(self, enabled: bool) -> MenuItemBuilder
Enable or disable this menu item.
Sourcepub fn accelerator<A>(
self,
accelerator: Option<A>,
) -> Result<MenuItemBuilder, Error>
pub fn accelerator<A>( self, accelerator: Option<A>, ) -> Result<MenuItemBuilder, Error>
Set this menu item accelerator.
Trait Implementations§
Source§impl Clone for MenuItemBuilder
impl Clone for MenuItemBuilder
Source§fn clone(&self) -> MenuItemBuilder
fn clone(&self) -> MenuItemBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MenuItemBuilder
impl Debug for MenuItemBuilder
Source§impl Default for MenuItemBuilder
impl Default for MenuItemBuilder
Source§fn default() -> MenuItemBuilder
fn default() -> MenuItemBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MenuItemBuilder
impl RefUnwindSafe for MenuItemBuilder
impl Send for MenuItemBuilder
impl Sync for MenuItemBuilder
impl Unpin for MenuItemBuilder
impl UnwindSafe for MenuItemBuilder
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