Expand description
Enum for storage FlagValue
Variants
Bool(bool)
Variant shows bool flag value
String(String)
Variant shows string flag value
Int(isize)
Variant shows int flag value
Float(f64)
Variant for float flag value
Invalid(String)
Variant for invalid flag value
None
Variant for no flag value
Implementations
sourceimpl FlagValue
impl FlagValue
sourcepub fn get_type(&self) -> Option<&FlagType>
pub fn get_type(&self) -> Option<&FlagType>
Get &self’s corresponding type of FlagType. Returns None if &self is a invalid flag value. FlagValueに対応するFlagTypeを取得する
sourcepub fn is_type(&self, flag_type: &FlagType) -> bool
pub fn is_type(&self, flag_type: &FlagType) -> bool
Returns true if &self’s FlagType is flag_type.
sourcepub fn get_bool_value_from_string(val: String) -> FlagValue
pub fn get_bool_value_from_string(val: String) -> FlagValue
Gets bool FlagValue from string
sourcepub fn get_string(self) -> String
pub fn get_string(self) -> String
Gets string from self
sourcepub fn is_bool_true(&self) -> bool
pub fn is_bool_true(&self) -> bool
Returns true if self is FlagValue::Bool(true)
Trait Implementations
sourceimpl PartialOrd<FlagValue> for FlagValue
impl PartialOrd<FlagValue> for FlagValue
sourcefn partial_cmp(&self, other: &FlagValue) -> Option<Ordering>
fn partial_cmp(&self, other: &FlagValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl StructuralPartialEq for FlagValue
Auto Trait Implementations
impl RefUnwindSafe for FlagValue
impl Send for FlagValue
impl Sync for FlagValue
impl Unpin for FlagValue
impl UnwindSafe for FlagValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more