var searchIndex = {}; searchIndex["clap"] = {"doc":"Command Line Argument Parser for Rust","items":[[3,"Arg","clap","The abstract representation of a command line argument used by the consumer of the library.\nUsed to set all the options and relationships that define a valid argument for the program.",null,null],[12,"name","","The unique name of the argument",0,null],[12,"short","","The short version (i.e. single character) of the argument, no preceding `-`\n**NOTE:** `short` is mutually exclusive with `index`",0,null],[12,"long","","The long version of the flag (i.e. word) without the preceding `--`\n**NOTE:** `long` is mutually exclusive with `index`",0,null],[12,"help","","The string of text that will displayed to the user when the application's\n`help` text is displayed",0,null],[12,"required","","If this is a required by default when using the command line program,\ne.g. a configuration file that's required for the program to function\n**NOTE:** required by default means it is required *until* mutually\nexclusive arguments are evaluated.",0,null],[12,"takes_value","","Determines if this argument is an option (as opposed to flag or positional) and\nis mutually exclusive with `index` and `multiple`",0,null],[12,"index","","The index of the argument. `index` is mutually exclusive with `takes_value`\nand `multiple`",0,null],[12,"multiple","","Determines if multiple instances of the same flag are allowed. `multiple`\nis mutually exclusive with `index`.\ne.g. `-v -v -v` or `-vvv` or `--option foo --option bar`",0,null],[12,"blacklist","","A list of names for other arguments that *may not* be used with this flag",0,null],[12,"possible_vals","","A list of possible values for an option or positional argument",0,null],[12,"requires","","A list of names of other arguments that are *required* to be used when\nthis flag is used",0,null],[12,"group","","A name of the group the argument belongs to",0,null],[12,"val_names","","A set of names (ordered) for the values to be displayed with the help message",0,null],[12,"num_vals","","The exact number of values to satisfy this argument",0,null],[12,"max_vals","","The maximum number of values possible for this argument",0,null],[12,"min_vals","","The minimum number of values possible to satisfy this argument",0,null],[12,"empty_vals","","Specifies whether or not this argument accepts explicit empty values such as `--option ""`",0,null],[12,"global","","Specifies whether or not this argument is global and should be propagated through all\nchild subcommands",0,null],[12,"validator","","A function used to check the validity of an argument value. Failing this validation results\nin failed argument parsing.",0,null],[12,"overrides","","A list of names for other arguments that *mutually override* this flag",0,null],[12,"hidden","","Specifies whether the argument should show up in the help message",0,null],[3,"ArgGroup","","`ArgGroup`s are a family of related arguments and way for you to say, "Any of these arguments".\nBy placing arguments in a logical group, you can make easier requirement and exclusion rules\ninstead of having to list each individually, or when you want a rule to apply "any but not all"\narguments.",null,null],[3,"ArgMatches","","Used to get information about the arguments that where supplied to the program at runtime by\nthe user. To get a new instance of this struct you use `.get_matches()` of the `App` struct.",null,null],[3,"SubCommand","","The abstract representation of a command line subcommand used by the consumer of the library.",null,null],[3,"App","","Used to create a representation of a command line program and all possible command line\narguments.",null,null],[3,"ClapError","","Command line argument parser error",null,null],[12,"error","","Formated error message",1,null],[12,"error_type","","The type of error",1,null],[4,"AppSettings","","Application level settings, which affect how `App` operates",null,null],[13,"SubcommandsNegateReqs","","Allows subcommands to override all requirements of the parent (this command). For example\nif you had a subcommand or even top level application which had a required arguments that\nare only required as long as there is no subcommand present.",2,null],[13,"SubcommandRequired","","Allows specifying that if no subcommand is present at runtime, error and exit gracefully",2,null],[13,"ArgRequiredElseHelp","","Specifies that the help text should be displayed (and then exit gracefully), if no\narguments are present at runtime (i.e. an empty run such as, `$ myprog`.",2,null],[13,"GlobalVersion","","Uses version of the current command for all subcommands. (Defaults to false; subcommands\nhave independant version strings)",2,null],[13,"VersionlessSubcommands","","Disables `-V` and `--version` for all subcommands (Defaults to false; subcommands have\nversion flags)",2,null],[13,"UnifiedHelpMessage","","By default the auto-generated help message groups flags, options, and positional arguments\nseparately. This setting disable that and groups flags and options together presenting a\nmore unified help message (a la getopts or docopt style).",2,null],[13,"WaitOnError","","Will display a message "Press [ENTER]/[RETURN] to continue..." and wait user before\nexiting",2,null],[13,"SubcommandRequiredElseHelp","","Specifies that the help text should be displayed (and then exit gracefully), if no\nsubcommands are present at runtime (i.e. an empty run such as, `$ myprog`.",2,null],[13,"Hidden","","Specifies that this subcommand should be hidden from help messages",2,null],[13,"TrailingVarArg","","Specifies that the final positional argument is a vararg and that `clap` should not attempt\nto parse any further args.",2,null],[13,"NoBinaryName","","Specifies that the parser should not assume the first argument passed is the binary name.\nThis is normally the case when using a "daemon" style mode, or an interactive CLI where one\none would not normally type the binary or program name for each command.",2,null],[4,"Format","","Defines styles for different types of error messages. Defaults to Error=Red, Warning=Yellow,\nand Good=Green",null,null],[13,"Error","","Defines the style used for errors, defaults to Red",3,null],[13,"Warning","","Defines the style used for warnings, defaults to Yellow",3,null],[13,"Good","","Defines the style used for good values, defaults to Green",3,null],[4,"ClapErrorType","","Command line argument parser error types",null,null],[13,"InvalidValue","","Error occurs when some possible values were set, but clap found unexpected value",4,null],[13,"InvalidArgument","","Error occurs when clap found unexpected flag or option",4,null],[13,"InvalidSubcommand","","Error occurs when clap found unexpected subcommand",4,null],[13,"EmptyValue","","Error occurs when option does not allow empty values but some was found",4,null],[13,"ValueValidationError","","Option fails validation of a custom validator",4,null],[13,"ArgumentError","","Parser inner error",4,null],[13,"TooManyArgs","","Error occurs when an application got more arguments then were expected",4,null],[13,"TooManyValues","","Error occurs when argument got more values then were expected",4,null],[13,"TooFewValues","","Error occurs when argument got less values then were expected",4,null],[13,"WrongNumValues","","Error occurs when argument got a different number of values then were expected",4,null],[13,"ArgumentConflict","","Error occurs when clap find two ore more conflicting arguments",4,null],[13,"MissingRequiredArgument","","Error occurs when one or more required arguments missing",4,null],[13,"MissingSubcommand","","Error occurs when required subcommand missing",4,null],[13,"MissingArgumentOrSubcommand","","Occurs when no argument or subcommand has been supplied and\n`AppSettings::ArgRequiredElseHelp` was used",4,null],[13,"UnexpectedArgument","","Error occurs when clap find argument while is was not expecting any",4,null],[13,"UnexpectedMultipleUsage","","Error occurs when argument was used multiple times and was not set as multiple.",4,null],[13,"InvalidUnicode","","Error occurs when argument contains invalid unicode characters",4,null],[13,"HelpDisplayed","","Not a true 'error' as it means `--help` or similar was used. The help message will be sent\nto `stdout` unless the help is displayed due to an error (such as missing subcommands) at\nwhich point it will be sent to `stderr`",4,null],[13,"VersionDisplayed","","Not a true 'error' as it means `--version` or similar was used. The message will be sent\nto `stdout`",4,null],[13,"InternalError","","Represents an internal error, please consider filing a bug report if this happens!",4,null],[13,"Io","","Represents an I/O error, typically white writing to stderr or stdout",4,null],[13,"Format","","Represents an Rust Display Format error, typically white writing to stderr or stdout",4,null],[11,"clone","","",2,null],[11,"eq","","",2,null],[11,"fmt","","",2,null],[11,"from_str","","",2,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"new","","Creates a new instance of an application requiring a name (such as the binary). The name\nwill be displayed to the user when they request to print version or help and usage\ninformation. The name should not contain spaces (hyphens '-' are ok).",5,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"author","","Sets a string of author(s) and will be displayed to the user when they request the help\ninformation with `--help` or `-h`.",5,null],[11,"bin_name","","Overrides the system-determined binary name. This should only be used when absolutely\nneccessary, such as the binary name for your application is misleading, or perhaps *not*\nhow the user should invoke your program.",5,null],[11,"about","","Sets a string briefly describing what the program does and will be displayed when\ndisplaying help information.",5,null],[11,"after_help","","Adds additional help information to be displayed in addition to and directly after\nauto-generated help. This information is displayed **after** the auto-generated help\ninformation. This additional help is often used to describe how to use the arguments,\nor caveats to be noted.",5,null],[11,"subcommands_negate_reqs","","Allows subcommands to override all requirements of the parent (this command). For example\nif you had a subcommand or even top level application which had a required arguments that\nare only required as long as there is no subcommand present.",5,null],[11,"subcommand_required","","Allows specifying that if no subcommand is present at runtime, error and exit gracefully",5,null],[11,"version","","Sets a string of the version number to be displayed when displaying version or help\ninformation.",5,null],[11,"usage","","Sets a custom usage string to override the auto-generated usage string.",5,null],[11,"help","","Sets a custom help message and overrides the auto-generated one. This should only be used\nwhen the auto-generated message does not suffice.",5,null],[11,"help_short","","Sets the short version of the `help` argument without the preceding `-`.",5,null],[11,"version_short","","Sets the short version of the `version` argument without the preceding `-`.",5,null],[11,"arg_required_else_help","","Specifies that the help text sould be displayed (and then exit gracefully), if no\narguments are present at runtime (i.e. an empty run such as, `$ myprog`.",5,null],[11,"hidden","","Hides a subcommand from help message output.",5,null],[11,"global_version","","Uses version of the current command for all subcommands. (Defaults to false; subcommands\nhave independant version strings)",5,null],[11,"versionless_subcommands","","Disables `-V` and `--version` for all subcommands (Defaults to false; subcommands have\nversion flags)",5,null],[11,"unified_help_message","","By default the auto-generated help message groups flags, options, and positional arguments\nseparately. This setting disable that and groups flags and options together presenting a\nmore unified help message (a la getopts or docopt style).",5,null],[11,"wait_on_error","","Will display a message "Press [ENTER]/[RETURN] to continue..." and wait user before\nexiting",5,null],[11,"subcommand_required_else_help","","Specifies that the help text sould be displayed (and then exit gracefully), if no\nsubcommands are present at runtime (i.e. an empty run such as, `$ myprog`.",5,null],[11,"setting","","Enables Application level settings, passed as argument",5,null],[11,"settings","","Enables multiple Application level settings, passed as argument",5,null],[11,"arg","","Adds an argument to the list of valid possibilties manually. This method allows you full\ncontrol over the arguments settings and options (as well as dynamic generation). It also\nallows you specify several more advanced configuration options such as relational rules\n(exclusions and requirements).",5,null],[11,"args","","Adds multiple arguments to the list of valid possibilties by iterating over a Vec of Args",5,null],[11,"arg_from_usage","","A convienience method for adding a single basic argument (one without advanced\nrelational rules) from a usage type string. The string used follows the same rules and\nsyntax as `Arg::from_usage()`",5,null],[11,"args_from_usage","","Adds multiple arguments at once from a usage string, one per line. See `Arg::from_usage()`\nfor details on the syntax and rules supported.",5,null],[11,"arg_group","","Adds an ArgGroup to the application. ArgGroups are a family of related arguments. By\nplacing them in a logical group, you make easier requirement and exclusion rules. For\ninstance, you can make an ArgGroup required, this means that one (and *only* one) argument\nfrom that group must be present. Using more than one argument from an ArgGroup causes a\nfailure (graceful exit).",5,null],[11,"arg_groups","","Adds a ArgGroups to the application. ArgGroups are a family of related arguments. By\nplacing them in a logical group, you make easier requirement and exclusion rules. For\ninstance, you can make an ArgGroup required, this means that one (and *only* one) argument\nfrom that group must be present. Using more than one argument from an ArgGroup causes a\nfailure (graceful exit).",5,null],[11,"subcommand","","Adds a subcommand to the list of valid possibilties. Subcommands are effectively sub apps,\nbecause they can contain their own arguments, subcommands, version, usage, etc. They also\nfunction just like apps, in that they get their own auto generated help, version, and\nusage.",5,null],[11,"subcommands","","Adds multiple subcommands to the list of valid possibilties by iterating over a Vec of\n`SubCommand`s",5,null],[11,"print_help","","Prints the full help message to `io::stdout()` using a `BufWriter`",5,null],[11,"write_help","","Writes the full help message to the user to a `io::Write` object",5,null],[11,"get_matches","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands",5,null],[11,"get_matches_lossy","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands. Invalid unicode characters are replaced with\n`U+FFFD REPLACEMENT CHARACTER`",5,null],[11,"get_matches_safe","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands",5,null],[11,"get_matches_safe_lossy","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands. Invalid unicode characters are replaced with\n`U+FFFD REPLACEMENT CHARACTER`",5,null],[11,"get_matches_from","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands",5,null],[11,"get_matches_from_lossy","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands. Invalid unicode characters are replaced with\n`U+FFFD REPLACEMENT CHARACTER`",5,null],[11,"get_matches_from_safe","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands",5,null],[11,"get_matches_from_safe_lossy","","Starts the parsing process. Called on top level parent app **ONLY** then recursively calls\nthe real parsing function for all subcommands. Invalid unicode characters are replaced with\n`U+FFFD REPLACEMENT CHARACTER`",5,null],[11,"get_matches_from_safe_borrow","","Starts the parsing process without consuming the `App` struct `self`. This is normally not\nthe desired functionality, instead prefer `App::get_matches_from_safe` which *does*\nconsume `self`.",5,null],[11,"get_matches_from_safe_borrow_lossy","","Starts the parsing process without consuming the `App` struct `self`. This is normally not\nthe desired functionality, instead prefer `App::get_matches_from_safe` which *does*\nconsume `self`. Invalid unicode characters are replaced with `U+FFFD REPLACEMENT CHARACTER`",5,null],[11,"default","","",0,{"inputs":[],"output":{"name":"arg"}}],[11,"with_name","","Creates a new instance of `Arg` using a unique string name.\nThe name will be used by the library consumer to get information about\nwhether or not the argument was used at runtime.",0,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"from_usage","","Creates a new instance of `Arg` from a usage string. Allows creation of basic settings\nfor Arg (i.e. everything except relational rules). The syntax is flexible, but there are\nsome rules to follow.",0,{"inputs":[{"name":"str"}],"output":{"name":"arg"}}],[11,"short","","Sets the short version of the argument without the preceding `-`.",0,null],[11,"long","","Sets the long version of the argument without the preceding `--`.",0,null],[11,"help","","Sets the help text of the argument that will be displayed to the user\nwhen they print the usage/help information.",0,null],[11,"required","","Sets whether or not the argument is required by default. Required by\ndefault means it is required, when no other mutually exclusive rules have\nbeen evaluated. Mutually exclusive rules take precedence over being required\nby default.",0,null],[11,"conflicts_with","","Sets a mutually exclusive argument by name. I.e. when using this argument,\nthe following argument can't be present.",0,null],[11,"conflicts_with_all","","Sets mutually exclusive arguments by names. I.e. when using this argument,\nthe following argument can't be present.",0,null],[11,"mutually_overrides_with","","Sets a mutually overridable argument by name. I.e. this argument and\nthe following argument will override each other in POSIX style",0,null],[11,"mutually_overrides_with_all","","Sets a mutually overridable arguments by name. I.e. this argument and\nthe following argument will override each other in POSIX style",0,null],[11,"requires","","Sets an argument by name that is required when this one is present I.e. when\nusing this argument, the following argument *must* be present.",0,null],[11,"requires_all","","Sets arguments by names that are required when this one is present I.e. when\nusing this argument, the following arguments *must* be present.",0,null],[11,"takes_value","","Specifies that the argument takes an additional value at run time.",0,null],[11,"index","","Specifies the index of a positional argument starting at 1.",0,null],[11,"multiple","","Specifies that the flag or option may appear more than once. For flags, this results\nin the number of occurrences of the flag being recorded. For example `-ddd` would count as\nthree occurrences. The form `-d -d -d` would also be recognized as three occurrences. For\noptions, more than one value may be provided. The forms `--optional foo --optional bar`,\n`--optional foo bar` and `-ofoo -obar` are all recognized, assuming the relevant `short`\nand `long` option names have been set.",0,null],[11,"global","","Specifies that an argument can be matched to all child subcommands.",0,null],[11,"empty_values","","Allows an argument to accept explicit empty values. An empty value must be specified at the\ncommand line with an explicit `""`, or `''`",0,null],[11,"hidden","","Hides an argument from help message output.",0,null],[11,"possible_values","","Specifies a list of possible values for this argument. At runtime, clap verifies that only\none of the specified values was used, or fails with a usage string.",0,null],[11,"possible_value","","Specifies a possible value for this argument. At runtime, clap verifies that only\none of the specified values was used, or fails with a usage string.",0,null],[11,"group","","Specifies the name of the group the argument belongs to.",0,null],[11,"number_of_values","","Specifies how many values are required to satisfy this argument. For example, if you had a\n`-f <file>` argument where you wanted exactly 3 'files' you would set\n`.number_of_values(3)`, and this argument wouldn't be satisfied unless the user provided\n3 and only 3 values.",0,null],[11,"validator","","Allows one to perform a validation on the argument value. You provide a closure which\naccepts a `String` value, a `Result` where the `Err(String)` is a message displayed to the\nuser.",0,null],[11,"max_values","","Specifies the *maximum* number of values are for this argument. For example, if you had a\n`-f <file>` argument where you wanted up to 3 'files' you would set\n`.max_values(3)`, and this argument would be satisfied if the user provided, 1, 2, or 3\nvalues.",0,null],[11,"min_values","","Specifies the *minimum* number of values are for this argument. For example, if you had a\n`-f <file>` argument where you wanted at least 2 'files' you would set\n`.min_values(2)`, and this argument would be satisfied if the user provided, 2 or more\nvalues.",0,null],[11,"value_names","","Specifies names for values of option arguments. These names are cosmetic only, used for\nhelp and usage strings only. The names are **not** used to access arguments. The values of\nthe arguments are accessed in numeric order (i.e. if you specify two names `one` and `two`\n`one` will be the first matched value, `two` will be the second).",0,null],[11,"value_name","","Specifies the name for value of option or positional arguments. This name is cosmetic only,\nused for help and usage strings. The name is **not** used to access arguments.",0,null],[11,"from","","",0,{"inputs":[{"name":"arg"}],"output":{"name":"self"}}],[11,"fmt","","",6,null],[11,"value_of","","Gets the value of a specific option or positional argument (i.e. an argument that takes\nan additional value at runtime). If the option wasn't present at runtime\nit returns `None`.",6,null],[11,"values_of","","Gets the values of a specific option or positional argument in a vector (i.e. an argument\nthat takes multiple values at runtime). If the option wasn't present at runtime it\nreturns `None`",6,null],[11,"is_present","","Returns if an argument was present at runtime.",6,null],[11,"occurrences_of","","Returns the number of occurrences of an option, flag, or positional argument at runtime.\nIf an argument isn't present it will return `0`. Can be used on arguments which *don't*\nallow multiple occurrences, but will obviously only return `0` or `1`.",6,null],[11,"subcommand_matches","","Returns the `ArgMatches` for a particular subcommand or None if the subcommand wasn't\npresent at runtime.",6,null],[11,"subcommand_name","","Returns the name of the subcommand used of the parent `App`, or `None` if one wasn't found",6,null],[11,"subcommand","","Returns the name and `ArgMatches` of the subcommand used at runtime or ("", None) if one\nwasn't found.",6,null],[11,"usage","","Returns a string slice of the usage statement for the `App` (or `SubCommand`)",6,null],[11,"fmt","","",7,null],[11,"with_name","","Creates a new instance of a subcommand requiring a name. Will be displayed\nto the user when they print version or help and usage information.",7,{"inputs":[{"name":"str"}],"output":{"name":"app"}}],[11,"with_name","","Creates a new instance of `ArgGroup` using a unique string name.\nThe name will only be used by the library consumer and not displayed to the use.",8,{"inputs":[{"name":"str"}],"output":{"name":"self"}}],[11,"add","","Adds an argument to this group by name",8,null],[11,"add_all","","Adds multiple arguments to this group by name",8,null],[11,"required","","Sets the requirement of this group. A required group will be displayed in the usage string\nof the application in the format `[arg|arg2|arg3]`. A required `ArgGroup` simply states\nthat one, and only one argument from this group *must* be present at runtime (unless\nconflicting with another argument).",8,null],[11,"requires","","Sets the requirement rules of this group. This is not to be confused with a required group.\nRequirement rules function just like argument requirement rules, you can name other\narguments or groups that must be present when one of the arguments from this group is used.",8,null],[11,"requires_all","","Sets the requirement rules of this group. This is not to be confused with a required group.\nRequirement rules function just like argument requirement rules, you can name other\narguments or groups that must be present when one of the arguments from this group is used.",8,null],[11,"conflicts_with","","Sets the exclusion rules of this group. Exclusion rules function just like argument\nexclusion rules, you can name other arguments or groups that must not be present when one\nof the arguments from this group are used.",8,null],[11,"conflicts_with_all","","Sets the exclusion rules of this group. Exclusion rules function just like argument\nexclusion rules, you can name other arguments or groups that must not be present when one\nof the arguments from this group are used.",8,null],[11,"fmt","","",8,null],[11,"fmt","","",3,null],[11,"fmt","","",3,null],[11,"eq","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"fmt","","",1,null],[11,"use_stderr","","Should the message be written to `stdout` or not",1,null],[11,"exit","","Prints the error to `stderr` and exits with a status of `1`",1,null],[11,"description","","",1,null],[11,"cause","","",1,null],[11,"fmt","","",1,null],[11,"from","","",1,{"inputs":[{"name":"error"}],"output":{"name":"self"}}],[11,"from","","",1,{"inputs":[{"name":"error"}],"output":{"name":"self"}}],[14,"value_t!","","Convenience macro getting a typed value `T` where `T` implements `std::str::FromStr`\nThis macro returns a `Result<T,String>` which allows you as the developer to decide\nwhat you'd like to do on a failed parse. There are two types of errors, parse failures\nand those where the argument wasn't present (such as a non-required argument).",null,null],[14,"value_t_or_exit!","","Convenience macro getting a typed value `T` where `T` implements `std::str::FromStr`\nThis macro returns a `T` or `Vec<T>` or exits with a usage string upon failure. This\nremoves some of the boiler plate to handle failures from value_t! above.",null,null],[14,"simple_enum!","","Convenience macro generated a simple enum with variants to be used as a type when parsing\narguments. This enum also provides a `variants()` function which can be used to retrieve a\n`Vec<&'static str>` of the variant names.",null,null],[14,"arg_enum!","","Convenience macro to generate more complete enums with variants to be used as a type when\nparsing arguments. This enum also provides a `variants()` function which can be used to retrieve a\n`Vec<&'static str>` of the variant names.",null,null],[14,"crate_version!","","Allows you pull the version for an from your Cargo.toml as MAJOR.MINOR.PATCH_PKGVERSION_PRE",null,null],[14,"clap_app!","","App, Arg, SubCommand and Group builder macro (Usage-string like input)",null,null]],"paths":[[3,"Arg"],[3,"ClapError"],[4,"AppSettings"],[4,"Format"],[4,"ClapErrorType"],[3,"App"],[3,"ArgMatches"],[3,"SubCommand"],[3,"ArgGroup"]]}; initSearch(searchIndex);