pub struct Value {
pub name: &'static str,
/* private fields */
}
Expand description
Represents a setting value.
This is used for iterating values in Flags
.
Fields§
§name: &'static str
The name of the setting associated with this value.
Implementations§
source§impl Value
impl Value
sourcepub fn kind(&self) -> SettingKind
pub fn kind(&self) -> SettingKind
Gets the kind of setting.
sourcepub fn as_enum(&self) -> Option<&'static str>
pub fn as_enum(&self) -> Option<&'static str>
Gets the enum value if the value is from an enum setting.
sourcepub fn as_num(&self) -> Option<u8>
pub fn as_num(&self) -> Option<u8>
Gets the numerical value if the value is from a num setting.
sourcepub fn as_bool(&self) -> Option<bool>
pub fn as_bool(&self) -> Option<bool>
Gets the boolean value if the value is from a boolean setting.
sourcepub fn value_string(&self) -> String
pub fn value_string(&self) -> String
Builds a string from the current value
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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