Trait Command

Source
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

Abscissa core prelude 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§

Source

fn name() -> &'static str

Name of this program as a string

Source

fn description() -> &'static str

Description of this program

Source

fn authors() -> &'static str

Authors of this program

Provided Methods§

Source

fn parse_args<T, I>(into_args: I) -> Self
where Self: Parser, I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse command-line arguments from an iterator

Source

fn parse_env_args() -> Self
where Self: Parser,

Parse command-line arguments from the environment

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.

Implementors§