pub enum OptionSpec {
Toggle {
id: &'static str,
label: &'static str,
default: bool,
},
Choice {
id: &'static str,
label: &'static str,
choices: &'static [(&'static str, &'static str)],
default: &'static str,
},
Number {
id: &'static str,
label: &'static str,
min: i64,
max: i64,
default: i64,
},
Group {
label: &'static str,
},
Text {
id: &'static str,
label: &'static str,
placeholder: &'static str,
default: &'static str,
},
}Variants§
Toggle
Choice
A one-of-N picker. Choices are (value, label) pairs.
Fields
Number
Group
A heading that starts a new row of options. Carries no value of its own; it exists so a tool with many knobs can say which of them decide the answer and which decide how it is presented.
Text
A short free-text field, for values no picker can enumerate — a cron field, a delimiter, a format string. Rendered inline with the other options, so keep it genuinely short.
Implementations§
Trait Implementations§
Source§impl Clone for OptionSpec
impl Clone for OptionSpec
Source§fn clone(&self) -> OptionSpec
fn clone(&self) -> OptionSpec
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 moreimpl Copy for OptionSpec
Auto Trait Implementations§
impl Freeze for OptionSpec
impl RefUnwindSafe for OptionSpec
impl Send for OptionSpec
impl Sync for OptionSpec
impl Unpin for OptionSpec
impl UnsafeUnpin for OptionSpec
impl UnwindSafe for OptionSpec
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