Struct rhai::EvalContext [−][src]
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]ⓘ
[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]
&mut self,
expr: &Expression<'_>
) -> Result<Dynamic, Box<EvalAltResult>>
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,
'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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,