[go: up one dir, main page]

Struct rhai::EvalState[][src]

pub struct EvalState {
    pub always_search: bool,
    pub scope_level: usize,
    pub operations: u64,
    pub modules: usize,
}
Expand description

[INTERNALS] A type that holds all the current states of the Engine. Exported under the internals feature only.

WARNING

This type is volatile and may change.

Fields

always_search: 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, subsequent offsets become mis-aligned. When that happens, this flag is turned on to force a scope lookup 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.

operations: u64

Number of operations performed.

modules: usize

Number of modules loaded.

Implementations

Create a new State.

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

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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)

recently added

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.