Struct rhai::Imports [−][src]
pub struct Imports { /* fields omitted */ }
(INTERNALS) A stack of imported modules.
Exported under the internals
feature only.
Volatile Data Structure
This type is volatile and may change.
Implementations
impl Imports
[src]
impl Imports
[src]pub fn len(&self) -> usize
[src]
Get the length of this stack of imported modules.
pub fn is_empty(&self) -> bool
[src]
Is this stack of imported modules empty?
pub fn get(&self, index: usize) -> Option<Shared<Module>>
[src]
Get the imported modules at a particular index.
pub fn find(&self, name: &str) -> Option<usize>
[src]
Get the index of an imported modules by name.
pub fn push(
&mut self,
name: impl Into<Identifier>,
module: impl Into<Shared<Module>>
)
[src]
&mut self,
name: impl Into<Identifier>,
module: impl Into<Shared<Module>>
)
Push an imported modules onto the stack.
pub fn truncate(&mut self, size: usize)
[src]
Truncate the stack of imported modules to a particular length.
pub fn iter(&self) -> impl Iterator<Item = (&str, &Module)>
[src]
Get an iterator to this stack of imported modules in reverse order.
pub fn into_iter(self) -> impl Iterator<Item = (Identifier, Shared<Module>)>
[src]
Get a consuming iterator to this stack of imported modules in reverse order.
pub fn contains_fn(&self, hash: u64) -> bool
[src]
Does the specified function hash key exist in this stack of imported modules?
pub fn get_fn(
&self,
hash: u64
) -> Option<(&CallableFunction, Option<&Identifier>)>
[src]
&self,
hash: u64
) -> Option<(&CallableFunction, Option<&Identifier>)>
Get specified function via its hash key.
pub fn contains_iter(&self, id: TypeId) -> bool
[src]
pub fn get_iter(
&self,
id: TypeId
) -> Option<fn(_: Dynamic) -> Box<dyn Iterator<Item = Dynamic>>>
[src]
&self,
id: TypeId
) -> Option<fn(_: Dynamic) -> Box<dyn Iterator<Item = Dynamic>>>
Get the specified TypeId
iterator.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Imports
impl !RefUnwindSafe for Imports
impl !UnwindSafe for Imports
impl !UnwindSafe for Imports