pub struct OptionProperties<'a, O: Default, P: Default> {
pub matcher: &'a Matcher<O, P>,
pub char_index: usize,
pub env_line_approximate_char_index: usize,
pub arg_index: usize,
pub env_arg_index: usize,
pub option_index: usize,
pub code: String,
pub value_text: Option<String>,
}Expand description
Properties for an Option Arg variant
Fields§
§matcher: &'a Matcher<O, P>Matcher which matched this argument.
char_index: usizeIndex of character where the parsed argument started. If a line was parsed, this will be the index in the line. If environmental arguments were parsed, this will be the index in the environmental argument where the parsed argument started.
env_line_approximate_char_index: usizeApproximate index of character in the line where the parsed argument started. If a line was parsed, this will be the same as char_index and be exact. If environmental arguments were parsed, this will an approximate position in the line.
arg_index: usizeIndex of the parsed argument.
env_arg_index: usizeIndex of the environment argument in which the parsed argument started. If a line is parsed, this will always be zero.
option_index: usizeIndex of the parsed option arguments. (Parameters arguments are ignored in this index.)
code: StringOption code of the option argument.
value_text: Option<String>Text in the option value. If option did not have a value, then this holds None.