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

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.