Trait Command
pub trait Command:
Debug
+ FromArgMatches
+ Runnable {
// Required methods
fn name() -> &'static str;
fn description() -> &'static str;
fn authors() -> &'static str;
// Provided methods
fn parse_args<T, I>(into_args: I) -> Self
where Self: Parser,
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone { ... }
fn parse_env_args() -> Self
where Self: Parser { ... }
}
Expand description
Commonly used Abscissa traits
Subcommand of an application: derives or otherwise implements the Options
trait, but also has a run()
method which can be used to invoke the given
(sub)command.
Required Methods§
fn description() -> &'static str
fn description() -> &'static str
Description of this program
Authors of this program
Provided Methods§
fn parse_args<T, I>(into_args: I) -> Self
fn parse_args<T, I>(into_args: I) -> Self
Parse command-line arguments from an iterator
fn parse_env_args() -> Selfwhere
Self: Parser,
fn parse_env_args() -> Selfwhere
Self: Parser,
Parse command-line arguments from the environment
Object Safety§
This trait is not object safe.