Type Alias Handler

Source
pub type Handler<'a> = dyn FnMut(&[&str]) -> Result<CommandStatus> + 'a;
Expand description

Command handler.

It should return the status in case of correct execution. In case of errors, all the errors will be handled by the REPL, except for CriticalError, which will be passed up from the REPL.

The handler should validate command arguments and can return ArgsError to indicate that arguments were wrong.