Crate argparsnip[][src]

Modules

Macros

Small macro to avoid writing ..Default::default everywhere

Small macro to avoid writing ..Default::default everywhere

Structs

Struct defining a single arg we can accept

Struct defining the collection of args we support

A specific combination of args that must be matched in Filters. E.g Filter { args: vec![“foo”, “bar”], filter_type: Any} will pass on foo | bar E.g Filter { args: vec![“foo”, “bar”], filter_type: All} will only pass on foo & bar E.g Filter { args: vec![“foo”, “bar”], filter_type: Any, inverse: true} will pass on foo ^ bar E.g Filter { args: vec![“foo”, “bar”], filter_type: All, inverse: true} will only pass on !(foo & bar)

Collection of filters used to constrain the combinations of arguments that can be matched. For example, to say we cannot get both args A && B, or we can only be passed C if we’ve also been passed D.

Results object returned by arg parsing (or passed to the handler)

Enums

How to match filters: All -> the filter passes if all are true Any -> the filter passes if any are true

The number of values users are able to assign an arg If None we will treat the arg as a flag. This is a special case because if flags are seen multiple times (e.g -vvv) we need to handle that as extra verbose by exposing the number of repetitions. This isn’t needed for normal flags though - just now we overwrite them, but in the future we may move to appending there

Traits