pub struct Args {
pub template_names: Vec<String>,
pub server_url: String,
pub generator_uri: String,
pub lister_uri: String,
pub show_help: bool,
pub show_version: bool,
pub show_author: bool,
pub show_list: bool,
pub check_template_names: bool,
}Expand description
Struct to gather cli args parsing result.
Used by crate::parser::ArgsParser implementations to store
parsing result.
Fields§
§template_names: Vec<String>A non-empty list of gitignore template names.
- Represented by the provided positional arguments, and required
unless any of
author,versionorhelpoptions are given. - This field does not allow commas in any of its field.
server_url: StringThe gitignore template generator service url.
- Optional value represented by the cli option
crate::constant::cli_options::SERVER_URLthat takes a string value, and falling back tocrate::constant::template_manager::BASE_URLif not provided in cli args.
generator_uri: StringThe gitignore template generator service endpoint uri.
- Optional value represented by the cli option
crate::constant::cli_options::GENERATOR_URIthat takes a string value, and falling back tocrate::constant::template_manager::GENERATOR_URIif not provided in cli args.
lister_uri: StringThe gitignore template lister service endpoint uri.
- Optional value represented by the cli option
crate::constant::cli_options::LISTER_URIthat takes a string value, and falling back tocrate::constant::template_manager::LISTER_URIif not provided in cli args.
show_help: boolThe boolean indicator of whether to display help infos or not.
- Optional value represented by the cli option
crate::constant::cli_options::HELP, and falling back tofalseif not provided in cli args. - Has precedence over version and author options if multiple are given
show_version: boolThe boolean indicator of whether to display version infos or not.
- Optional value represented by the cli option
crate::constant::cli_options::VERSION, and falling back tofalseif not provided in cli args. - Has precedence over author option if multiple are given
The boolean indicator of whether to display author infos or not.
- Optional value represented by the cli option
crate::constant::cli_options::AUTHOR, and falling back tofalseif not provided in cli args.
show_list: boolThe boolean indicator of whether to display list of available templates or not.
- Optional value represented by the cli option
crate::constant::cli_options::LIST, and falling back tofalseif not provided in cli args.
check_template_names: boolThe boolean indicator of whether to enable robust template check or not.
Robust template check allow the script to handle template existence check without reaching the generator endpoint.
- Optional value represented by the cli option
crate::constant::cli_options::CHECK, and falling back tofalseif not provided in cli args.