Struct rhai::EvalState [−][src]
(INTERNALS) A type that holds all the current states of the Engine
.
Exported under the internals
feature only.
Volatile Data Structure
This type is volatile and may change.
Fields
source: Option<Identifier>
Source of the current context.
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.
resolver: Option<Shared<StaticModuleResolver>>
Embedded module resolver.
Implementations
impl State
[src]
pub fn is_global(&self) -> bool
[src]
Is the state currently at global (root) level?
pub fn fn_resolution_cache_mut(
&mut self
) -> &mut BTreeMap<u64, Option<FnResolutionCacheEntry>>
[src]
&mut self
) -> &mut BTreeMap<u64, Option<FnResolutionCacheEntry>>
Get a mutable reference to the current function resolution cache.
pub fn push_fn_resolution_cache(&mut self)
[src]
Push an empty function resolution cache onto the stack and make it current.
pub fn pop_fn_resolution_cache(&mut self)
[src]
Remove the current function resolution cache from the stack and make the last one current.
Panics
Panics if there are no more function resolution cache in the stack.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,