Skip to main content

AtbCli

Trait AtbCli 

Source
pub trait AtbCli: Sized {
Show 16 methods // Required method fn impl_version() -> String; // Provided methods fn executable_name() -> String { ... } fn name() -> String { ... } fn version() -> String { ... } fn authors() -> Vec<String> { ... } fn description() -> String { ... } fn repository() -> String { ... } fn commit() -> String { ... } fn branch() -> String { ... } fn platform() -> String { ... } fn rustc_info() -> String { ... } fn client_id() -> String { ... } fn globals_from(&self) -> Option<&BaseCli> { ... } fn parse() -> Self where Self: Parser + Sized { ... } fn set_globals(base: &BaseCli) { ... } fn from_iter<I>(iter: I) -> Self where Self: Parser + Sized, I: IntoIterator, I::Item: Into<OsString> + Clone { ... }
}

Required Methods§

Source

fn impl_version() -> String

Returns implementation details.

Provided Methods§

Source

fn executable_name() -> String

Executable file name.

Source

fn name() -> String

Application name.

Source

fn version() -> String

Application version.

Source

fn authors() -> Vec<String>

Application authors.

Source

fn description() -> String

Application description.

Source

fn repository() -> String

Application repository.

Source

fn commit() -> String

Returns git commit hash.

Source

fn branch() -> String

Returns git branch.

Source

fn platform() -> String

Returns OS platform.

Source

fn rustc_info() -> String

Returns rustc version.

Source

fn client_id() -> String

Returns the client ID: {name}/v{version}

Source

fn globals_from(&self) -> Option<&BaseCli>

Optional hook to expose the embedded BaseCli from the parsed value. If implemented, parse()/from_iter() will automatically call set_globals using the returned BaseCli. Default is None for backward compatibility.

Source

fn parse() -> Self
where Self: Parser + Sized,

Helper function used to parse the command line arguments

Source

fn set_globals(base: &BaseCli)

Source

fn from_iter<I>(iter: I) -> Self
where Self: Parser + Sized, I: IntoIterator, I::Item: Into<OsString> + Clone,

Helper function used to parse the command line arguments. This is the equivalent of clap::Parser::parse_from.

To allow running the command without subcommand, it also sets a few more settings: clap::Command::propagate_version, clap::Command::args_conflicts_with_subcommands, clap::Command::subcommand_negates_reqs.

Creates Self from any iterator over arguments. Print the error message and quit the program in case of failure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§