pub trait Command: Debug + Options + Runnable {
fn name() -> &'static str;
fn description() -> &'static str;
fn version() -> &'static str;
fn authors() -> &'static str;
fn from_args<A>(into_args: A) -> Self
where
A: IntoIterator<Item = String>,
{ ... }
fn from_env_args() -> Self { ... }
fn print_usage_and_exit(args: &[String]) -> ! { ... }
fn subcommand_usage(_command: &str) -> Option<Usage> { ... }
}
Expand description
Commonly used Abscissa traits
Subcommand of an application: derives or otherwise implements the Options
trait, but also has a call()
method which can be used to invoke the given
(sub)command.
Required Methods§
sourcefn description() -> &'static str
fn description() -> &'static str
Description of this program
Authors of this program
Provided Methods§
sourcefn from_args<A>(into_args: A) -> Selfwhere
A: IntoIterator<Item = String>,
fn from_args<A>(into_args: A) -> Selfwhere
A: IntoIterator<Item = String>,
Parse command-line arguments from a string iterator
sourcefn from_env_args() -> Self
fn from_env_args() -> Self
Parse command-line arguments from the environment
sourcefn print_usage_and_exit(args: &[String]) -> !
fn print_usage_and_exit(args: &[String]) -> !
Print usage information and exit
sourcefn subcommand_usage(_command: &str) -> Option<Usage>
fn subcommand_usage(_command: &str) -> Option<Usage>
Get usage information for a particular subcommand (if available)