pub enum Control {
Switch {
on: bool,
},
Choice {
value: String,
options: Vec<ChoiceOption>,
style: Option<ChoiceStyle>,
mono: Option<bool>,
},
Number {
value: f64,
min: Option<f64>,
max: Option<f64>,
step: Option<f64>,
unit: Option<String>,
labels: BTreeMap<String, String>,
},
Text {
value: String,
placeholder: Option<String>,
secret: Option<bool>,
mono: Option<bool>,
},
Keys {
keys: Vec<Vec<String>>,
},
Multi {
values: Vec<String>,
options: Vec<ChoiceOption>,
ordered: Option<bool>,
},
Action {
act: Option<String>,
label: Option<String>,
},
}Expand description
A prefs row’s control, by k.
Variants§
Switch
A toggle.
Choice
One of several options.
Number
A stepper.
Fields
Text
A text field look.
Fields
Keys
Keycap chords.
Multi
Toggle chips or an ordered list.
Fields
§
options: Vec<ChoiceOption>The options.
Action
A button.
Trait Implementations§
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Freeze for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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