[−][src]Macro light_cli::lightcli
This macro allows for an easy way to define key value commands.
Arguments
$cli
: TheLightCliInput
instance to parse data from.$cl_out
: TheLightCliOutput
instance to write errors to.$cmd
: The identifier to use to access the current command.$key
: The identifier to use to access the curernt key.$val
: The identifier to use to access the curernt value.$cmdv
: The name of the command.$keyv
: The key for command$cmdv
.$action
: What to do with the value$val
for the given command and key.$done
: What to do when the command is complete.
Remarks
For a command that doesn't use the output and allows for custom
error handling see the macro lightcli_adv!
. This macro makes use
of the underlying function parse_data
.