pub struct EvalContext<'a, 's, 'ps, 'g, 'pg, 'c, 'pc, 't, 'pt> { /* private fields */ }
Expand description

Context of a script evaluation process.

Implementations

Create a new EvalContext.

The current Engine.

The current source.

The current Scope.

Get a mutable reference to the current Scope.

Get an iterator over the current set of modules imported via import statements, in reverse order (i.e. modules imported last come first).

Custom state kept in a Dynamic.

Mutable reference to the custom state kept in a Dynamic.

(internals) The current GlobalRuntimeState. Exported under the internals feature only.

(internals) Get a mutable reference to the current GlobalRuntimeState. Exported under the internals feature only.

Get an iterator over the namespaces containing definition of all script-defined functions.

(internals) The current set of namespaces containing definitions of all script-defined functions. Exported under the internals feature only.

The current bound this pointer, if any.

Mutable reference to the current bound this pointer, if any.

The current nesting level of function calls.

Evaluate an expression tree within this evaluation context.

WARNING - Low Level API

This function is very low level. It evaluates an expression from an AST.

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.