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

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§