Trait clap::CommandFactory

source ·
pub trait CommandFactory: Sized {
    // Required methods
    fn into_app<'help>() -> Command<'help>;
    fn into_app_for_update<'help>() -> Command<'help>;

    // Provided methods
    fn command<'help>() -> Command<'help> { ... }
    fn command_for_update<'help>() -> Command<'help> { ... }
}
Expand description

Create a Command relevant for a user-defined container.

Derived as part of Parser.

Required Methods§

source

fn into_app<'help>() -> Command<'help>

Deprecated, replaced with CommandFactory::command

source

fn into_app_for_update<'help>() -> Command<'help>

Deprecated, replaced with CommandFactory::command_for_update

Provided Methods§

source

fn command<'help>() -> Command<'help>

Build a Command that can instantiate Self.

See FromArgMatches::from_arg_matches_mut for instantiating Self.

source

fn command_for_update<'help>() -> Command<'help>

Build a Command that can update self.

See FromArgMatches::update_from_arg_matches_mut for updating self.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: CommandFactory> CommandFactory for Box<T>

source§

fn into_app<'help>() -> Command<'help>

source§

fn into_app_for_update<'help>() -> Command<'help>

Implementors§