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