pub struct LiquidMenuItem {
pub label: String,
pub icon: Option<&'static str>,
pub checked: bool,
pub destructive: bool,
pub section_start: bool,
pub header: bool,
pub keeps_open: bool,
}Expand description
One menu entry.
Fields§
§label: String§icon: Option<&'static str>Optional leading icon (24×24 path data).
checked: boolDraws the leading checkmark (selected state).
destructive: boolDestructive styling.
section_start: boolStarts a new visual section (full-width hairline above).
header: boolA non-interactive gray section header (“Show”).
keeps_open: boolSelecting this row keeps the menu open (an accordion row: the caller
swaps items and the surface morphs to the new size in place).
Implementations§
Source§impl LiquidMenuItem
impl LiquidMenuItem
pub fn new(label: impl Into<String>) -> Self
pub fn icon(self, icon: &'static str) -> Self
pub fn checked(self, checked: bool) -> Self
pub fn destructive(self) -> Self
pub fn section_start(self) -> Self
Sourcepub fn keeps_open(self) -> Self
pub fn keeps_open(self) -> Self
Marks an accordion row: selecting it keeps the menu open while the caller swaps the item list (the surface morphs to the new size).
Trait Implementations§
Source§impl Clone for LiquidMenuItem
impl Clone for LiquidMenuItem
Source§fn clone(&self) -> LiquidMenuItem
fn clone(&self) -> LiquidMenuItem
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 LiquidMenuItem
impl Debug for LiquidMenuItem
Source§impl PartialEq for LiquidMenuItem
impl PartialEq for LiquidMenuItem
impl StructuralPartialEq for LiquidMenuItem
Auto Trait Implementations§
impl Freeze for LiquidMenuItem
impl RefUnwindSafe for LiquidMenuItem
impl Send for LiquidMenuItem
impl Sync for LiquidMenuItem
impl Unpin for LiquidMenuItem
impl UnsafeUnpin for LiquidMenuItem
impl UnwindSafe for LiquidMenuItem
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