Enum SettingKind
#[non_exhaustive]pub enum SettingKind {
Toggle {
default: bool,
},
Choice {
options: Vec<String>,
default: usize,
},
Range {
min: f64,
max: f64,
step: f64,
default: f64,
},
Color {
default: u32,
},
}Expand description
What a setting is, with its default.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Toggle
On or off.
Choice
One of options, by index; each option is a translation key.
Fields
Range
A number from min to max in steps of step, drawn as a slider.
Fields
Color
A colour, 0xRRGGBB, without alpha.
Trait Implementations§
§impl Clone for SettingKind
impl Clone for SettingKind
§fn clone(&self) -> SettingKind
fn clone(&self) -> SettingKind
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 more§impl Debug for SettingKind
impl Debug for SettingKind
§impl PartialEq for SettingKind
impl PartialEq for SettingKind
impl StructuralPartialEq for SettingKind
Auto Trait Implementations§
impl Freeze for SettingKind
impl RefUnwindSafe for SettingKind
impl Send for SettingKind
impl Sync for SettingKind
impl Unpin for SettingKind
impl UnsafeUnpin for SettingKind
impl UnwindSafe for SettingKind
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