Struct rhai::Imports [−][src]
(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]
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<ImmutableString>,
module: impl Into<Shared<Module>>
)
[src]
&mut self,
name: impl Into<ImmutableString>,
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 = (ImmutableString, Shared<Module>)>
[src]
self
) -> impl Iterator<Item = (ImmutableString, Shared<Module>)>
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<&ImmutableString>)>
[src]
&self,
hash: u64
) -> Option<(&CallableFunction, Option<&ImmutableString>)>
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 !Send for Imports
impl !Sync for Imports
impl Unpin for Imports
impl !UnwindSafe for Imports
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<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[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<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
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<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[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<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
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>,