pub struct MenuItemBuilder {
pub label: Option<String>,
pub icon: Option<IconName>,
pub shortcut: Option<String>,
pub disabled: Option<bool>,
pub destructive: Option<bool>,
pub onclick: Option<Rc<dyn Fn()>>,
pub children: Option<Vec<NodeBlueprint>>,
pub __strata_key: Option<String>,
}Fields§
§label: Option<String>§icon: Option<IconName>§shortcut: Option<String>§disabled: Option<bool>§destructive: Option<bool>§onclick: Option<Rc<dyn Fn()>>§children: Option<Vec<NodeBlueprint>>§__strata_key: Option<String>Implementations§
Source§impl MenuItemBuilder
impl MenuItemBuilder
pub fn label(self, val: impl Into<String>) -> Self
pub fn icon(self, val: impl Into<Option<IconName>>) -> Self
pub fn shortcut(self, val: impl IntoOptionalString) -> Self
pub fn disabled(self, val: impl Into<Option<bool>>) -> Self
pub fn destructive(self, val: impl Into<Option<bool>>) -> Self
pub fn onclick<Args>( self, handler: impl EventHandlerMarker<Args> + 'static, ) -> Self
pub fn onclick_fn(self, handler: impl Fn() + 'static) -> Self
pub fn children(self, children: Vec<NodeBlueprint>) -> Self
pub fn key(self, key: impl Display) -> Self
pub fn build(self) -> View
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MenuItemBuilder
impl !Send for MenuItemBuilder
impl !Sync for MenuItemBuilder
impl !UnwindSafe for MenuItemBuilder
impl Forget for MenuItemBuilder
impl Freeze for MenuItemBuilder
impl Move for MenuItemBuilder
impl Unpin for MenuItemBuilder
impl UnsafeUnpin 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