pub struct DropdownMenuItem {
pub label: String,
pub icon: Option<String>,
pub shortcut: Option<String>,
pub disabled: bool,
pub destructive: bool,
}Expand description
Pre-built dropdown menu item (alternative to builder pattern)
Fields§
§label: StringMenu item label
icon: Option<String>Optional icon
shortcut: Option<String>Optional keyboard shortcut text
disabled: boolWhether the item is disabled
destructive: boolWhether the item is destructive (e.g., delete action)
Implementations§
Source§impl DropdownMenuItem
impl DropdownMenuItem
Sourcepub const fn destructive(self) -> Self
pub const fn destructive(self) -> Self
Make this a destructive item
Trait Implementations§
Source§impl Clone for DropdownMenuItem
impl Clone for DropdownMenuItem
Source§fn clone(&self) -> DropdownMenuItem
fn clone(&self) -> DropdownMenuItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DropdownMenuItem
impl RefUnwindSafe for DropdownMenuItem
impl Send for DropdownMenuItem
impl Sync for DropdownMenuItem
impl Unpin for DropdownMenuItem
impl UnsafeUnpin for DropdownMenuItem
impl UnwindSafe for DropdownMenuItem
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