Struct rhai::Imports [−][src]
pub struct Imports { /* fields omitted */ }
Expand description
(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 get(&self, index: usize) -> Option<Shared<Module>>
[src]
pub fn get(&self, index: usize) -> Option<Shared<Module>>
[src]Get the imported modules at a particular index.
pub fn push(
&mut self,
name: impl Into<Identifier>,
module: impl Into<Shared<Module>>
)
[src]
pub fn push(
&mut self,
name: impl Into<Identifier>,
module: impl Into<Shared<Module>>
)
[src]Push an imported modules onto the stack.
pub fn truncate(&mut self, size: usize)
[src]
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]
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]
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]
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]
pub fn get_fn(
&self,
hash: u64
) -> Option<(&CallableFunction, Option<&Identifier>)>
[src]Get specified function via its hash key.
pub fn contains_iter(&self, id: TypeId) -> bool
[src]
pub fn contains_iter(&self, id: TypeId) -> bool
[src]Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Imports
impl !Send for Imports
impl !Sync for Imports
impl Unpin for Imports
impl !UnwindSafe for Imports
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more