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

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

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

impl<'a, S> ParentCommand<'a, S>[src]

pub fn new(name: &'a str, sub_cmds: Vec<Command<'a, S>>) -> ParentCommand<'a, S>[src]

Creates a new ParentCommand.

Arguments

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

pub fn new_with_help(
    name: &'a str,
    help: &'a str,
    sub_cmds: Vec<Command<'a, S>>
) -> ParentCommand<'a, S>
[src]

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.

pub fn sub_commands(&self) -> &CommandSet<'_, S>[src]

Returns a CommandSet of the child commands under this ParentCommand.

Trait Implementations

impl<'a, S> BaseCommand for ParentCommand<'a, S>[src]

type State = S

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

Auto Trait Implementations

impl<'a, S> !RefUnwindSafe for ParentCommand<'a, S>

impl<'a, S> !Send for ParentCommand<'a, S>

impl<'a, S> !Sync for ParentCommand<'a, S>

impl<'a, S> Unpin for ParentCommand<'a, S>

impl<'a, S> !UnwindSafe for ParentCommand<'a, S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.