pub enum OptionDef {
Slider {
name: String,
label: Label,
min: f64,
max: f64,
step: f64,
default: f64,
unit: Option<Localized>,
},
Select {
name: String,
label: Label,
choices: Vec<Choice>,
default: String,
},
Text {
name: String,
label: Label,
placeholder: Option<Localized>,
default: Option<String>,
},
File {
name: String,
label: Label,
},
Directory {
name: String,
label: Label,
},
Feature {
name: String,
label: Label,
default: bool,
options: Vec<OptionDef>,
},
}Expand description
One option. name is the variable it fills or, for a Feature, the
feature it switches.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OptionDef
impl<'de> Deserialize<'de> for OptionDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for OptionDef
Auto Trait Implementations§
impl Freeze for OptionDef
impl RefUnwindSafe for OptionDef
impl Send for OptionDef
impl Sync for OptionDef
impl Unpin for OptionDef
impl UnsafeUnpin for OptionDef
impl UnwindSafe for OptionDef
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