pub struct MenuEntry {
pub id: i32,
pub label: String,
pub enabled: bool,
pub visible: bool,
pub check: Check,
pub separator: bool,
pub children: Vec<MenuEntry>,
}Expand description
One menu entry. Ids are chosen by the caller, must be unique within the menu, and must not be 0 (the root). A separator ignores its label; an entry with children is a submenu.
Fields§
§id: i32The id reported in Event::MenuItem.
label: StringThe label, shown literally (underscores are escaped from dbusmenu’s mnemonic syntax).
enabled: boolWhether the entry can be chosen.
visible: boolWhether the entry is shown.
check: CheckThe checkmark state.
separator: boolWhether the entry is a separator line.
children: Vec<MenuEntry>The submenu’s entries.
Implementations§
Source§impl MenuEntry
impl MenuEntry
A submenu.
Sourcepub fn with_check(self, check: Check) -> Self
pub fn with_check(self, check: Check) -> Self
The same entry with a checkmark state.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
The same entry with enabled set.
Trait Implementations§
impl Eq for MenuEntry
impl StructuralPartialEq for MenuEntry
Auto Trait Implementations§
impl Forget for MenuEntry
impl Freeze for MenuEntry
impl Move for MenuEntry
impl RefUnwindSafe for MenuEntry
impl Send for MenuEntry
impl Sync for MenuEntry
impl Unpin for MenuEntry
impl UnsafeUnpin for MenuEntry
impl UnwindSafe for MenuEntry
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