[−][src]Module molt::types
Public Type Declarations
This module defines a number of types used throughout Molt's public API.
The most important types are Value
, the type of data values in the Molt
language, and MoltResult
, Molt's standard Result<T,E>
type. MoltResult
is an alias for Result<Value,Exception>
, where Exception
contains the data
relating to an exceptional return from a script. The heart of Exception
is the
ResultCode
, which represents all of the ways a Molt script might return early:
errors, explicit returns, breaks, and continues.
MoltInt
, MoltFloat
, MoltList
, and MoltDict
a/Displayre simple type aliases
defining Molt's internal representation for integers, floats, and TCL lists and
dictionaries.
Re-exports
pub use crate::value::Value; |
Structs
ContextID | A unique identifier, used to identify cached context data within a given
interpreter. For more information see the discussion of command definition
and the context cache in The Molt Book and the |
ErrorData | This struct contains the error code and stack trace (i.e., the "error info" string)
for |
Exception | This struct represents the exceptional results of evaluating a Molt script, as
used in |
Subcommand | A Molt command that has subcommands is called an ensemble command. In Rust code,
the ensemble is defined as an array of |
VarName | In TCL, variable references have two forms. A string like "some_var(some_index)" is
the name of an array element; any other string is the name of a scalar variable. This
struct is used when parsing variable references. The |
Enums
ResultCode | This enum represents the different kinds of |
Type Definitions
CommandFunc | A function used to implement a binary Molt command. For more information see the
discussion of command definition in The Molt Book and the |
MoltDict | The standard dictionary type for Molt code. |
MoltFloat | The standard floating point type for Molt code. |
MoltInt | The standard integer type for Molt code. |
MoltList | The standard list type for Molt code. |
MoltResult | The standard |