pub struct EuvDropdownItem {
pub label: &'static str,
pub value: &'static str,
pub active: bool,
}Expand description
One entry of the euv_dropdown menu.
Carries the display label and the opaque value handed to on_select.
Fields§
§label: &'static strThe display label.
value: &'static strThe opaque value passed to the select callback.
active: boolWhether this item is the currently selected value.
Drives the _active class: the accent fill and the text-on-accent
label colour, matching how euv_sidebar marks the current page.
Defaults to false, so existing call sites keep the neutral look.
Implementations§
Source§impl EuvDropdownItem
impl EuvDropdownItem
pub fn get_label(&self) -> &'static str
pub fn get_mut_label(&mut self) -> &mut &'static str
pub fn set_label(&mut self, val: &'static str) -> &mut Self
pub fn get_value(&self) -> &'static str
pub fn get_mut_value(&mut self) -> &mut &'static str
pub fn set_value(&mut self, val: &'static str) -> &mut Self
pub fn get_active(&self) -> bool
pub fn get_mut_active(&mut self) -> &mut bool
pub fn set_active(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for EuvDropdownItem
impl Clone for EuvDropdownItem
impl Copy for EuvDropdownItem
Source§impl Debug for EuvDropdownItem
impl Debug for EuvDropdownItem
Auto Trait Implementations§
impl Freeze for EuvDropdownItem
impl RefUnwindSafe for EuvDropdownItem
impl Send for EuvDropdownItem
impl Sync for EuvDropdownItem
impl Unpin for EuvDropdownItem
impl UnsafeUnpin for EuvDropdownItem
impl UnwindSafe for EuvDropdownItem
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