CommandFunc

Type Alias CommandFunc 

Source
pub type CommandFunc = fn(&mut Interp, ContextID, &[Value]) -> MoltResult;
Expand description

A function used to implement a binary Molt command. For more information see the discussion of command definition in The Molt Book and the interp module.

The command may retrieve its application context from the interp’s context cache if it was defined with a ContextID.

The command function receives the interpreter, the context ID, and a slice representing the command and its arguments.