pub struct Menu { /* private fields */ }Expand description
A context menu whose click callback receives the selected item’s label.
Implementations§
Source§impl Menu
impl Menu
Sourcepub fn new(
items: impl IntoIterator<Item = MenuItem>,
on_click: impl IntoPayloadCallback<String>,
) -> Self
pub fn new( items: impl IntoIterator<Item = MenuItem>, on_click: impl IntoPayloadCallback<String>, ) -> Self
Creates a menu and a callback that receives the selected item’s label.
Trait Implementations§
impl StructuralPartialEq for Menu
Auto Trait Implementations§
impl !RefUnwindSafe for Menu
impl !Send for Menu
impl !Sync for Menu
impl !UnwindSafe for Menu
impl Freeze for Menu
impl Unpin for Menu
impl UnsafeUnpin for Menu
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