Struct terminal_cli::CliPropertyFn [−] [src]

pub struct CliPropertyFn<Fo, Fi> where Fo: Fn() -> String, Fi: Fn(&str, &mut CliTerminal) -> () {
    pub var_name: String,
    pub var_output: Fo,
    pub var_input: Fi,
    pub val_hint: String,
}

Retrieved property that can be changed with set var_name <value> and retrieved with get var_name. Useful for values that are changed by other parts of the system, like RTC clock or some other counter.

Fields

var_name

Name of the property

var_output

Output the current value of the property

var_input

Try to parse and set the property

val_hint

Hint for the setter explanation

Trait Implementations

impl<Fo, Fi> CliCommand for CliPropertyFn<Fo, Fi> where Fo: Fn() -> String, Fi: 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>>