pub struct MenuItem<'a> {
pub kind: MenuItemKind,
pub label: &'a str,
pub href: Option<&'a str>,
pub danger: bool,
pub disabled: bool,
pub kbd: Option<&'a str>,
pub attrs: &'a [HtmlAttr<'a>],
}Fields§
§kind: MenuItemKind§label: &'a str§href: Option<&'a str>§danger: bool§disabled: bool§kbd: Option<&'a str>§attrs: &'a [HtmlAttr<'a>]Implementations§
Source§impl<'a> MenuItem<'a>
impl<'a> MenuItem<'a>
pub const fn link(label: &'a str, href: &'a str) -> Self
pub const fn separator() -> Self
pub const fn danger(self) -> Self
pub const fn disabled(self) -> Self
pub const fn with_kbd(self, kbd: &'a str) -> Self
pub const fn with_attrs(self, attrs: &'a [HtmlAttr<'a>]) -> Self
pub fn class_name(&self) -> &'static str
Trait Implementations§
Source§impl<'a> PartialEq for MenuItem<'a>
impl<'a> PartialEq for MenuItem<'a>
impl<'a> Copy for MenuItem<'a>
impl<'a> Eq for MenuItem<'a>
impl<'a> StructuralPartialEq for MenuItem<'a>
Auto Trait Implementations§
impl<'a> Freeze for MenuItem<'a>
impl<'a> RefUnwindSafe for MenuItem<'a>
impl<'a> Send for MenuItem<'a>
impl<'a> Sync for MenuItem<'a>
impl<'a> Unpin for MenuItem<'a>
impl<'a> UnsafeUnpin for MenuItem<'a>
impl<'a> UnwindSafe for MenuItem<'a>
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