pub trait FlagSetter {
// Required methods
fn is_bool_flag(&self) -> bool;
fn set(
&mut self,
value: Option<&OsStr>,
warnings: Option<&mut Vec<FlagWarning>>,
) -> Result<(), FlagParseError>;
}
Expand description
Places that can store parsed values.
All implementors of FlagValue
implement this.
Required Methods§
Sourcefn is_bool_flag(&self) -> bool
fn is_bool_flag(&self) -> bool
Indicates whether the flag is a boolean flag. Similar to FlagValue::is_bool_flag
.
For most types, this is false
.
Sourcefn set(
&mut self,
value: Option<&OsStr>,
warnings: Option<&mut Vec<FlagWarning>>,
) -> Result<(), FlagParseError>
fn set( &mut self, value: Option<&OsStr>, warnings: Option<&mut Vec<FlagWarning>>, ) -> Result<(), FlagParseError>
Parse a flag argument and store the result.