zebrad::prelude

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 name() -> &'static str

Name of this program as a string

fn description() -> &'static str

Description of this program

fn authors() -> &'static str

Authors of this program

Provided Methods§

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

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

Parse command-line arguments from the environment

Object Safety§

This trait is not object safe.

Implementors§