pub struct ParameterNode {
pub node: TreeNode,
pub required: bool,
pub kind: ParameterKind,
}
Expand description
A node representing a parameter for a command.
Fields§
§node: TreeNode
TreeNode
data.
required: bool
A required
parameter must be supplied for the
command line being parsed to be valid.
kind: ParameterKind
What type of ParameterKind
this is.
Implementations§
Trait Implementations§
Source§impl NodeOps for ParameterNode
impl NodeOps for ParameterNode
Source§fn accept<'text>(
&self,
parser: &mut Parser<'text>,
token: Token<'_>,
_node_ref: &Rc<Node>,
)
fn accept<'text>( &self, parser: &mut Parser<'text>, token: Token<'_>, _node_ref: &Rc<Node>, )
Record this parameter value.
Source§fn complete<'text>(&self, token: Option<Token<'text>>) -> Completion<'text>
fn complete<'text>(&self, token: Option<Token<'text>>) -> Completion<'text>
By default named and simple parameters complete only to the token being input while flag parameters complete to the name of the flag.
Auto Trait Implementations§
impl Freeze for ParameterNode
impl RefUnwindSafe for ParameterNode
impl !Send for ParameterNode
impl !Sync for ParameterNode
impl Unpin for ParameterNode
impl UnwindSafe for ParameterNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more