Struct argparsnip::Results [−][src]
pub struct Results<'a> { pub path: &'a str, pub flags: HashMap<&'a str, i32>, pub args: HashMap<&'a str, Value>, pub unknown_args: Vec<String>, pub positional: Vec<String>, }
Expand description
Results object returned by arg parsing (or passed to the handler)
Fields
path: &'a str
the Args struct we matched’s path, used to uniquely identify the command/subcommand
flags: HashMap<&'a str, i32>
mapping of flags to the number of times they were seen
args: HashMap<&'a str, Value>
mapping of args to the values seen for them if it is specified that the arg should only match one time this will be a single Value, otherwise it will be a Value::Array
unknown_args: Vec<String>
list of params seen that were not recognised
positional: Vec<String>
list of positional arguments seen note that while in the current implementation these can be interspersed between args, e.g –flag positional –flag2 is considered valid we do not guarantee that this will be true in future versions
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Results<'a>
impl<'a> UnwindSafe for Results<'a>