CommandFactory

Trait CommandFactory 

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

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

Create a Command relevant for a user-defined container.

Derived as part of Parser.

Required Methods§

Source

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

Deprecated, replaced with CommandFactory::command

Source

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

Deprecated, replaced with CommandFactory::command_for_update

Provided Methods§

Source

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

Build a Command that can instantiate Self.

See FromArgMatches::from_arg_matches_mut for instantiating Self.

Source

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

Build a Command that can update self.

See FromArgMatches::update_from_arg_matches_mut for updating self.

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.

Implementations on Foreign Types§

Source§

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

Source§

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

Source§

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

Implementors§