pub enum ContextMenuEntry<A = ()> {
Item(ContextMenuItem<A>),
Separator,
}Expand description
One row in a root menu or first-level submenu.
Separators occupy separator_height, are skipped by navigation, and cannot
activate. Items occupy row_height.
§Examples
use ailloli_ui_widgets::controls::{ContextMenuEntry, ContextMenuItem};
let entries: Vec<ContextMenuEntry<()>> = vec![
ContextMenuEntry::Item(ContextMenuItem::new("Copy")),
ContextMenuEntry::Separator,
];
assert!(matches!(entries[1], ContextMenuEntry::Separator));Variants§
Item(ContextMenuItem<A>)
Selectable or submenu-bearing row.
Separator
Non-interactive horizontal divider.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for ContextMenuEntry<A>
impl<A = ()> !RefUnwindSafe for ContextMenuEntry<A>
impl<A = ()> !Send for ContextMenuEntry<A>
impl<A = ()> !Sync for ContextMenuEntry<A>
impl<A> Unpin for ContextMenuEntry<A>
impl<A = ()> !UnwindSafe for ContextMenuEntry<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.