Enum SettingValue
#[non_exhaustive]pub enum SettingValue {
Toggle(bool),
Choice(usize),
Range(f64),
Color(u32),
}Expand description
A setting’s value, as the game keeps it and the mod reads it.
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(bool)
A toggle’s state.
Choice(usize)
A choice’s index.
Range(f64)
A range’s number.
Color(u32)
A colour, 0xRRGGBB.
Trait Implementations§
§impl Clone for SettingValue
impl Clone for SettingValue
§fn clone(&self) -> SettingValue
fn clone(&self) -> SettingValue
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 SettingValue
§impl Debug for SettingValue
impl Debug for SettingValue
§impl PartialEq for SettingValue
impl PartialEq for SettingValue
impl StructuralPartialEq for SettingValue
Auto Trait Implementations§
impl Freeze for SettingValue
impl RefUnwindSafe for SettingValue
impl Send for SettingValue
impl Sync for SettingValue
impl Unpin for SettingValue
impl UnsafeUnpin for SettingValue
impl UnwindSafe for SettingValue
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