Struct commands::parser::CommandNode [] [src]

pub struct CommandNode {
    pub node: TreeNode,
    pub handler: Option<fn(_: &Node)>,
    pub parameters: Vec<Rc<Node>>,
    pub wrapped_root: Option<Rc<Node>>,
}

A node representing a command. Constructed via Command and CommandTree.

If wrapped_root is set then this node wraps another command. This is used for the help command so that it can complete normal commands. The successors will be those of the wrapped node.

Fields

TreeNode data.

The handler which is executed once this node has been accepted.

Parameter nodes for this command

If present, the command wrapped by this node.

Methods

impl CommandNode
[src]

Construct a new CommandNode.

Trait Implementations

impl NodeOps for CommandNode
[src]

Record this command.

Can this node be accepted in the current parser state? By default, a node can be accepted when it hasn't been seen yet. Read more

Given a node and an optional token, provide the completion options. Read more

By default, a node matches a token when the name of the node starts with the token. Read more