pub struct LiquidMenuScope { /* private fields */ }Expand description
The scope a menu’s rows are declared in.
Each row carries its own action, so a caller never dispatches on a row index and never keeps a parallel list to look one up in. The first action stays closest to the trigger when the menu opens upward.
Implementations§
Source§impl LiquidMenuScope
impl LiquidMenuScope
Sourcepub fn item(&self, item: LiquidMenuItem, on_click: impl Fn() + 'static)
pub fn item(&self, item: LiquidMenuItem, on_click: impl Fn() + 'static)
An interactive row. Tapping it runs on_click, then dismisses the menu
unless the item keeps open.
Auto Trait Implementations§
impl !Freeze for LiquidMenuScope
impl !RefUnwindSafe for LiquidMenuScope
impl !Send for LiquidMenuScope
impl !Sync for LiquidMenuScope
impl !UnwindSafe for LiquidMenuScope
impl Unpin for LiquidMenuScope
impl UnsafeUnpin for LiquidMenuScope
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