pub struct DropdownItem {
pub label: Cow<'static, str>,
pub value: Option<Cow<'static, str>>,
pub disabled: bool,
}Expand description
A single item in a dropdown menu.
Items render as <button type="button" role="menuitem" tabindex="-1">
inside the floating menu container.
Fields§
§label: Cow<'static, str>Visible text label.
value: Option<Cow<'static, str>>Optional unique value attached to the item (rendered as
data-value="..."). Useful when the host application needs to map
item activation back to a domain-level identifier.
disabled: boolWhen true, the rendered button carries disabled and
aria-disabled="true".
Implementations§
Trait Implementations§
Source§impl Clone for DropdownItem
impl Clone for DropdownItem
Source§fn clone(&self) -> DropdownItem
fn clone(&self) -> DropdownItem
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 DropdownItem
impl Debug for DropdownItem
Source§impl Default for DropdownItem
impl Default for DropdownItem
Source§fn default() -> DropdownItem
fn default() -> DropdownItem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DropdownItem
impl RefUnwindSafe for DropdownItem
impl Send for DropdownItem
impl Sync for DropdownItem
impl Unpin for DropdownItem
impl UnsafeUnpin for DropdownItem
impl UnwindSafe for DropdownItem
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