Struct rhai::EvalState [−][src]
pub struct EvalState {
pub source: Option<Identifier>,
pub always_search: bool,
pub scope_level: usize,
pub operations: u64,
pub modules: usize,
pub resolver: Option<Shared<StaticModuleResolver>>,
// some fields omitted
}Expand description
(INTERNALS) A type that holds all the current states of the Engine.
Exported under the internals feature only.
Volatile Data Structure
This type is volatile and may change.
Fields
source: Option<Identifier>Source of the current context.
always_search: boolNormally, access to variables are parsed with a relative offset into the scope to avoid a lookup.
In some situation, e.g. after running an eval statement, subsequent offsets become mis-aligned.
When that happens, this flag is turned on to force a scope lookup by name.
scope_level: usizeLevel of the current scope. The global (root) level is zero, a new block (or function call) is one level higher, and so on.
operations: u64Number of operations performed.
modules: usizeNumber of modules loaded.
resolver: Option<Shared<StaticModuleResolver>>Embedded module resolver.
Implementations
Get a mutable reference to the current function resolution cache.
Push an empty function resolution cache onto the stack and make it current.
Remove the current function resolution cache from the stack and make the last one current.
Panics
Panics if there are no more function resolution cache in the stack.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Stateimpl !UnwindSafe for StateBlanket Implementations
Mutably borrows from an owned value. Read more