Struct commands::parser::ParameterNode [] [src]

pub struct ParameterNode {
    pub node: TreeNode,
    pub required: bool,
    pub kind: ParameterKind,
}

A node representing a parameter for a command.

Fields

node

TreeNode data.

required

A required parameter must be supplied for the command line being parsed to be valid.

kind

What type of ParameterKind this is.

Methods

impl ParameterNode

fn new(name: &str, help_text: Option<&str>, hidden: bool, priority: i32, successors: Vec<Rc<Node>>, repeatable: bool, repeat_marker: Option<Rc<Node>>, kind: ParameterKind, required: bool) -> Self

Construct a new ParameterNode.

Trait Implementations

impl NodeOps for ParameterNode

fn accept<'text>(&self, parser: &mut Parser<'text>, token: Token, _node_ref: &Rc<Node>)

fn acceptable(&self, parser: &Parser, node_ref: &Rc<Node>) -> bool

fn complete<'text>(&self, token: Option<Token<'text>>) -> Completion<'text>

fn matches(&self, _parser: &Parser, token: Token) -> bool