pub trait Command:
Debug
+ Options
+ Runnable {
// Required methods
fn name() -> &'static str;
fn description() -> &'static str;
fn version() -> &'static str;
fn authors() -> &'static str;
// Provided methods
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
Abscissa core prelude
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)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.