pub struct CliConfig {
    pub description: Option<String>,
    pub long_description: Option<String>,
    pub before_help: Option<String>,
    pub after_help: Option<String>,
    pub args: Option<Vec<CliArg>>,
    pub subcommands: Option<HashMap<String, CliConfig>>,
}
Expand description

describes a CLI configuration

Fields

description: Option<String>

Command description which will be shown on the help information.

long_description: Option<String>

Command long description which will be shown on the help information.

before_help: Option<String>

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.

after_help: Option<String>

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.

args: Option<Vec<CliArg>>

List of arguments for the command

subcommands: Option<HashMap<String, CliConfig>>

List of subcommands of this command

Implementations

List of arguments for the command

List of subcommands of this command

Command description which will be shown on the help information.

Command long description which will be shown on the help information.

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed before the auto-generated help information. This is often used for header information.

Adds additional help information to be displayed in addition to auto-generated help. This information is displayed after the auto-generated help information. This is often used to describe how to use the arguments, or caveats to be noted.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.