[][src]Type Definition molt::types::CommandFunc

type CommandFunc = fn(_: &mut Interp, _: ContextID, _: &[Value]) -> MoltResult;

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.