Struct rhai::EvalContext[][src]

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

Context of a script evaluation process.

Implementations

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

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

The current Engine.

pub fn source(&self) -> Option<&str>[src]

The current source.

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

The current Scope.

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

Mutable reference to the current Scope.

pub fn iter_imports(&self) -> impl Iterator<Item = (&str, &Module)>[src]

Get an iterator over the current set of modules imported via import statements.

pub fn imports(&self) -> &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 = &Module>[src]

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

pub fn namespaces(&self) -> &[&Module]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

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

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<'a, 'x, 'px, 'm, 's, 't, 'pt> Debug for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt>[src]

Auto Trait Implementations

impl<'a, 'x, 'px, 'm, 's, 't, 'pt> !RefUnwindSafe for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt>

impl<'a, 'x, 'px, 'm, 's, 't, 'pt> !Send for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt>

impl<'a, 'x, 'px, 'm, 's, 't, 'pt> !Sync for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt>

impl<'a, 'x, 'px, 'm, 's, 't, 'pt> Unpin for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt> where
    'pt: 't,
    'px: 'x, 

impl<'a, 'x, 'px, 'm, 's, 't, 'pt> !UnwindSafe for EvalContext<'a, 'x, 'px, 'm, 's, 't, 'pt>

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.