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§
Sourcefn impl_version() -> String
fn impl_version() -> String
Returns implementation details.
Provided Methods§
Sourcefn executable_name() -> String
fn executable_name() -> String
Executable file name.
Application authors.
Sourcefn description() -> String
fn description() -> String
Application description.
Sourcefn repository() -> String
fn repository() -> String
Application repository.
Sourcefn rustc_info() -> String
fn rustc_info() -> String
Returns rustc version.
Sourcefn globals_from(&self) -> Option<&BaseCli>
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.
fn set_globals(base: &BaseCli)
Sourcefn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
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".