Struct shi::command::parent::ParentCommand[][src]

pub struct ParentCommand<'a, S> { /* fields omitted */ }
Expand description

ParentCommand represents a command with subcommands. It has a name, but it does not execute anything itself. It dispatches to the appropriate child command, if one exists.

Implementations

Creates a new ParentCommand.

Arguments

name - The name of this command. sub_cmds - The subcommands or children of the ParentCommand to be created.

Creates a new ParentCommand with the given help message.

Arguments

name - The name of this command. sub_cmds - The subcommands or children of the ParentCommand to be created.

Returns a CommandSet of the child commands under this ParentCommand.

Trait Implementations

The State of the command. Expected to be bound to a containing Shell.

Returns the name of the command. This is equivalent to how the command would be invoked.

Validates the given arguments, returning a Result<()> indicating the result of validation. Read more

Executes the command. Read more

Returns a String representing the help text of this command. By default, returns nothing. Read more

Autocompletes a command, given arguments. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.