pub struct IconMenuItemBuilder { /* private fields */ }
Expand description
A builder type for IconMenuItem
Implementations§
Source§impl IconMenuItemBuilder
impl IconMenuItemBuilder
pub fn new() -> IconMenuItemBuilder
Sourcepub fn id(self, id: MenuId) -> IconMenuItemBuilder
pub fn id(self, id: MenuId) -> IconMenuItemBuilder
Set the id this icon menu item.
Sourcepub fn text<S>(self, text: S) -> IconMenuItemBuilder
pub fn text<S>(self, text: S) -> IconMenuItemBuilder
Set the text for this icon menu item.
See IconMenuItem::set_text
for more info.
Sourcepub fn enabled(self, enabled: bool) -> IconMenuItemBuilder
pub fn enabled(self, enabled: bool) -> IconMenuItemBuilder
Enable or disable this menu item.
Sourcepub fn icon(self, icon: Option<Icon>) -> IconMenuItemBuilder
pub fn icon(self, icon: Option<Icon>) -> IconMenuItemBuilder
Set this icon menu item icon.
Sourcepub fn native_icon(self, icon: Option<NativeIcon>) -> IconMenuItemBuilder
pub fn native_icon(self, icon: Option<NativeIcon>) -> IconMenuItemBuilder
Set this icon menu item native icon.
Sourcepub fn accelerator<A>(
self,
accelerator: Option<A>,
) -> Result<IconMenuItemBuilder, Error>
pub fn accelerator<A>( self, accelerator: Option<A>, ) -> Result<IconMenuItemBuilder, Error>
Set this icon menu item accelerator.
Sourcepub fn build(self) -> IconMenuItem
pub fn build(self) -> IconMenuItem
Build this icon menu item.
Trait Implementations§
Source§impl Clone for IconMenuItemBuilder
impl Clone for IconMenuItemBuilder
Source§fn clone(&self) -> IconMenuItemBuilder
fn clone(&self) -> IconMenuItemBuilder
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 IconMenuItemBuilder
impl Debug for IconMenuItemBuilder
Source§impl Default for IconMenuItemBuilder
impl Default for IconMenuItemBuilder
Source§fn default() -> IconMenuItemBuilder
fn default() -> IconMenuItemBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IconMenuItemBuilder
impl RefUnwindSafe for IconMenuItemBuilder
impl Send for IconMenuItemBuilder
impl !Sync for IconMenuItemBuilder
impl Unpin for IconMenuItemBuilder
impl UnwindSafe for IconMenuItemBuilder
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