Module move_model::model
source · Expand description
Provides a model for a set of Move modules (and scripts, which are handled like modules). The model allows to access many different aspects of the Move code: all declared functions and types, their associated bytecode, their source location, their source text, and the specification fragments.
The environment is nested into a hierarchy:
- A
GlobalEnv
which gives access to all modules plus other information on global level, and is the owner of all related data. - A
ModuleEnv
which is a reference to the data of some module in the environment. - A
StructEnv
which is a reference to the data of some struct in a module. - A
FunctionEnv
which is a reference to the data of some function in a module.
Structs
- A set of
Ability
s - Struct a helper type for implementing fmt::Display depending on GlobalEnv
- Expression Environment
- Field Environment
- Identifier for a field of a structure, relative to struct.
- Identifier for a Move function, relative to module.
- Global Environment
- A global id. Instances of this type represent unique identifiers relative to
GlobalEnv
. - Locations
- Formatting
- Module Environment
- Represents a module environment.
- Identifier for a module.
- Named Constant Environment
- Identifier for a named constant, relative to module.
- Identifier for a node in the AST, relative to a module. This is used to associate attributes with the node, like source location and type.
- Represents a parameter.
- Some identifier qualified by a module.
- Some identifier qualified by a module and a type instantiation.
- Identifier for a schema.
- Identifier for a specification function, relative to module.
- Identifier for a specification variable, relative to module.
- Struct Environment
- Identifier for a structure/resource, relative to module.
- Function Environment
Enums
Visibility
restricts the accessibility of the associated entity.- Verification Scope
Constants
- Names used in the bytecode/AST to represent the main function of a script
- Constants
Traits
Type Definitions
- Alias for the Loc variant of MoveIR. This uses a
&static str
instead ofFileId
for the file name. - Identifiers