pub struct MenuItem {
pub id: u32,
pub label: String,
pub command_string: Option<String>,
pub is_separator: bool,
pub is_disabled: bool,
pub is_checked: bool,
pub is_default: bool,
pub submenu: Option<Vec<MenuItem>>,
}Expand description
A single item from a context menu.
Obtained via ContextMenu::enumerate or
as part of a SelectedItem.
Fields§
§id: u32The raw command ID assigned by the shell handler.
label: StringDisplay label with accelerator characters (&) stripped.
command_string: Option<String>The verb/command string if available (e.g. "open", "delete",
"properties"). Not all items expose a verb.
is_separator: booltrue if this item is a visual separator line.
is_disabled: booltrue if this item is disabled / grayed out.
is_checked: booltrue if this item has a check mark.
is_default: booltrue if this is the default (bold) item.
Sub-menu items, if this item opens a submenu.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MenuItem
impl<'de> Deserialize<'de> for MenuItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MenuItem
impl StructuralPartialEq for MenuItem
Auto Trait Implementations§
impl Freeze for MenuItem
impl RefUnwindSafe for MenuItem
impl Send for MenuItem
impl Sync for MenuItem
impl Unpin for MenuItem
impl UnsafeUnpin for MenuItem
impl UnwindSafe for MenuItem
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