Trait FlagSetter

Source
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§

Source

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.

Source

fn set( &mut self, value: Option<&OsStr>, warnings: Option<&mut Vec<FlagWarning>>, ) -> Result<(), FlagParseError>

Parse a flag argument and store the result.

Implementors§