[][src]Struct rhai::EvalContext

pub struct EvalContext<'e, 'x, 'px: 'x, 'a, 's, 'm, 'pm: 'm, 't, 'pt: 't> { /* fields omitted */ }

Context of a script evaluation process.

Implementations

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

pub fn engine(&self) -> &'e Engine[src]

The current Engine.

pub fn source<'z: 's>(&'z self) -> Option<&'s str>[src]

The current source.

pub fn scope(&self) -> &Scope<'px>[src]

The current Scope.

pub fn scope_mut(&mut self) -> &mut &'x mut Scope<'px>[src]

Mutable reference to the current Scope.

pub fn imports(&'a self) -> &'a Imports[src]

(INTERNALS) The current set of modules imported via import statements. Available under the internals feature only.

pub fn iter_namespaces(&self) -> impl Iterator<Item = &'pm Module> + 'm[src]

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

pub fn this_ptr(&self) -> Option<&Dynamic>[src]

The current bound this pointer, if any.

pub fn call_level(&self) -> usize[src]

The current nesting level of function calls.

impl EvalContext<'_, '_, '_, '_, '_, '_, '_, '_, '_>[src]

pub fn eval_expression_tree(
    &mut self,
    expr: &Expression<'_>
) -> Result<Dynamic, Box<EvalAltResult>>
[src]

Evaluate an expression tree.

WARNING - Low Level API

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

Trait Implementations

impl<'e, 'x, 'px: 'x, 'a, 's, 'm, 'pm: 'm, 't, 'pt: 't> Debug for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

Auto Trait Implementations

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> !RefUnwindSafe for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> !Send for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> !Sync for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> Unpin for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> where
    'pm: 'm,
    'pt: 't,
    'px: 'x, 
[src]

impl<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt> !UnwindSafe for EvalContext<'e, 'x, 'px, 'a, 's, 'm, 'pm, 't, 'pt>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.