Struct quad_compat_rhai::EvalState[][src]

pub struct EvalState {
    pub always_search_scope: bool,
    pub scope_level: usize,
    // some fields omitted
}
Expand description

(internals) A type that holds all the current states of the Engine. Exported under the internals feature only.

Fields

always_search_scope: bool

Normally, 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, or after a custom syntax statement, subsequent offsets may become mis-aligned. When that happens, this flag is turned on to force a Scope search by name.

scope_level: usize

Level of the current scope. The global (root) level is zero, a new block (or function call) is one level higher, and so on.

Implementations

Create a new EvalState.

Is the state currently at global (root) level?

Get the number of function resolution cache(s) in the stack.

Get a mutable reference to the current function resolution cache.

Push an empty function resolution cache onto the stack and make it current.

Rewind the function resolution caches stack to a particular size.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.