pub struct SettingItem {
pub id: String,
pub label: String,
pub description: Option<String>,
pub current_value: String,
pub values: Option<Vec<String>>,
pub submenu: Option<Box<dyn Fn(String, Box<dyn Fn(Option<String>)>) -> Box<dyn Component>>>,
}Expand description
A setting item that can be toggled or expanded into a submenu.
Fields§
§id: String§label: String§description: Option<String>§current_value: String§values: Option<Vec<String>>Optional submenu: takes current value and a done callback. When provided, Enter/Space opens this submenu instead of cycling values.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SettingItem
impl !Send for SettingItem
impl !Sync for SettingItem
impl !UnwindSafe for SettingItem
impl Freeze for SettingItem
impl Unpin for SettingItem
impl UnsafeUnpin for SettingItem
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