Struct commands::parser::CommandTree [] [src]

pub struct CommandTree<'a> {
    // some fields omitted
}

Store a command tree while populating it. This is used to construct a RootNode to be used with the Parser.

The lifetime parameter 'a refers to the lifetime of the strings used for command and parameter names and help text.

Methods

impl<'a> CommandTree<'a>

fn new() -> Self

Create a new CommandTree.

fn command(&mut self, command: Command<'a>)

Add a Command to the CommandTree.

fn finalize(&self) -> Rc<Node>

Construct the CommandTree and produce a RootNode.

Trait Implementations

impl<'a> Default for CommandTree<'a>

fn default() -> Self