Crate molt_forked

Source
Expand description

§Molt Client Library

This module defines the API for Molt clients. The interp module defines the Molt interpreter itself, and provides the primary API. Values in the Molt language are stored internally using the Value struct. Other relevant data types, including MoltResult and ResultCode, are defined in the types module.

The test_harness module defines the test runner for Molt’s TCL-level testing. It can be used directly in Cargo integration tests or via a Molt shell, whether standard or custom.

See The Molt Book for an introduction to Molt.

Re-exports§

pub use crate::types::*;

Modules§

dict
Dictionary Utilities
interp
The Molt Interpreter
prelude
test_harness
Molt Test Harness
types
Public Type Declarations
value
The Value Type

Macros§

_gen_subcommand_generic
A Molt command that has subcommands is called an ensemble command. In Rust code, the ensemble is defined as an array of Subcommand structs, each one mapping from a subcommand name to the implementing CommandFunc. For more information, see the discussion of command definition in The Molt Book and the interp module.
gen_command
gen_subcommand
A Molt command that has subcommands is called an ensemble command. In Rust code, the ensemble is defined as an array of Subcommand structs, each one mapping from a subcommand name to the implementing CommandFunc. For more information, see the discussion of command definition in The Molt Book and the interp module.
join_helps
join_helps_subcmd
join_strings
molt_err
Returns an Error MoltResult. The error message is formatted as with format!().
molt_err_help
molt_err_uncompleted
molt_ok
Returns an Ok MoltResult.
molt_throw
Returns an Error MoltResult with a specific error code. The error message is formatted as with format!().

Functions§

check_args
This function is used in command functions to check whether the command’s argument list is of a proper size for the given command. If it is, check_args returns the empty result; if not, it returns a Molt error message wrong # args: should be "syntax...", where syntax is the command’s syntax. It is typically called at the beginning of a command function.