Struct terminal_cli::CliCommandKeyword [−] [src]

pub struct CliCommandKeyword<Fo> where Fo: Fn(&str, &mut CliTerminal) -> () {
    pub keyword: String,
    pub action: Fo,
}

Simple keyword command, like help with no arguments.

Fields

keyword

The keyword.

action

Action to be executed when the input matches.

Trait Implementations

impl<Fo> CliCommand for CliCommandKeyword<Fo> where Fo: Fn(&str, &mut CliTerminal) -> ()

fn execute(&mut self, cli: &mut CliTerminal, line: &str)

fn is_match(&self, line: &str) -> bool

fn autocomplete(&self, line_start: &str) -> Option<Vec<AutocompleteOption>>