[][src]Crate tamasfe_clap

A temporary fork of clap for personal use, DO NOT USE! https://github.com/clap-rs/clap

Macros

app_from_crate

Allows you to build the App instance from your Cargo.toml at compile time.

clap_app

Build App, Arg and Group with Usage-string like input but without the associated parsing runtime cost.

crate_authors

Allows you to pull the authors for the app from your Cargo.toml at compile time in the form: "author1 lastname <author1@example.com>:author2 lastname <author2@example.com>"

crate_description

Allows you to pull the description from your Cargo.toml at compile time.

crate_name

Allows you to pull the name from your Cargo.toml at compile time.

crate_version

Allows you to pull the version from your Cargo.toml at compile time as MAJOR.MINOR.PATCH_PKGVERSION_PRE

load_yaml

A convenience macro for loading the YAML file at compile time (relative to the current file, like modules work). That YAML object can then be passed to this function.

Structs

App

Represents a command line interface which is made up of all possible command line arguments and subcommands. Interface arguments and settings are configured using the "builder pattern." Once all configuration is complete, the App::get_matches family of methods starts the runtime-parsing process. These methods then return information about the user supplied arguments (or lack thereof).

Arg

The abstract representation of a command line argument. Used to set all the options and relationships that define a valid argument for the program.

ArgGroup

ArgGroups are a family of related arguments and way for you to express, "Any of these arguments". By placing arguments in a logical group, you can create easier requirement and exclusion rules instead of having to list each argument individually, or when you want a rule to apply "any but not all" arguments.

ArgMatches

Used to get information about the arguments that were supplied to the program at runtime by the user. New instances of this struct are obtained by using the App::get_matches family of methods.

Error

Command Line Argument Parser Error

Indices

An iterator for getting multiple indices out of an argument via the ArgMatches::indices_of method.

OsValues

An iterator for getting multiple values out of an argument via the [ArgMatches::values_of_os] method. Usage of this iterator allows values which contain invalid UTF-8 code points unlike [Values].

RegexRef

Contains either a regular expression or a reference to one.

Values

An iterator for getting multiple values out of an argument via the ArgMatches::values_of method.

Enums

AppSettings

Application level settings, which affect how App operates

ArgSettings

Various settings that apply to arguments and may be set, unset, and checked via getter/setter methods Arg::setting, Arg::unset_setting, and Arg::is_set. This is what the Arg methods which accept a bool use internally.

ErrorKind

Command line argument parser kind of error

ValueHint

Provides hints about argument types for shell command completion.

Traits

ArgEnum

@TODO @release @docs

Clap

The primary one-stop-shop trait used to create an instance of a clap App, conduct the parsing, and turn the resulting ArgMatches back into concrete instance of the user struct.

FromArgMatches

Converts an instance of ArgMatches to a consumer defined struct.

IntoApp

Build an App according to the struct

Subcommand

@TODO @release @docs

Type Definitions

Result

Short hand for Result type