pub struct ContextMenuItem {
pub id: &'static str,
pub label: String,
pub hint: Option<KeyHint>,
pub enabled: bool,
pub divider_after: bool,
}Expand description
One row in the right-click context menu.
Hooks own the meaning of custom ids; frontends only draw rows and
route clicks back through on_context_menu_action / built-in dispatch.
Fields§
§id: &'static strStable id ("cut", "copy", … or hook-defined e.g. "md.toggle-task").
label: StringPrimary row text.
hint: Option<KeyHint>Structured keybinding hint, rendered as right-aligned kbd chips.
enabled: boolWhether the row is clickable. Disabled rows render dimmed.
divider_after: boolWhether a separator renders directly below this row.
Implementations§
Source§impl ContextMenuItem
impl ContextMenuItem
Trait Implementations§
Source§impl Clone for ContextMenuItem
impl Clone for ContextMenuItem
Source§fn clone(&self) -> ContextMenuItem
fn clone(&self) -> ContextMenuItem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContextMenuItem
impl Debug for ContextMenuItem
impl Eq for ContextMenuItem
Source§impl PartialEq for ContextMenuItem
impl PartialEq for ContextMenuItem
Source§fn eq(&self, other: &ContextMenuItem) -> bool
fn eq(&self, other: &ContextMenuItem) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContextMenuItem
Auto Trait Implementations§
impl Freeze for ContextMenuItem
impl RefUnwindSafe for ContextMenuItem
impl Send for ContextMenuItem
impl Sync for ContextMenuItem
impl Unpin for ContextMenuItem
impl UnsafeUnpin for ContextMenuItem
impl UnwindSafe for ContextMenuItem
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