[−][src]Struct rhai::Imports
[INTERNALS] A stack of imported modules.
Exported under the internals
feature only.
WARNING
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<Rc<Module>>
[src]
Get the imported module at a particular index.
pub fn find(&self, name: &str) -> Option<usize>
[src]
Get the index of an imported module by name.
pub fn push(
&mut self,
name: impl Into<ImmutableString>,
module: impl Into<Rc<Module>>
)
[src]
&mut self,
name: impl Into<ImmutableString>,
module: impl Into<Rc<Module>>
)
Push an imported module 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, Rc<Module>)>
[src]
Get an iterator to this stack of imported modules.
pub fn into_iter(self) -> impl Iterator<Item = (ImmutableString, Rc<Module>)>
[src]
Get a consuming iterator to this stack of imported modules.
pub fn extend(
&mut self,
stream: impl Iterator<Item = (ImmutableString, Rc<Module>)>
)
[src]
&mut self,
stream: impl Iterator<Item = (ImmutableString, Rc<Module>)>
)
Add a stream of imported modules.
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 W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?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 W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?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 W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?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 W
impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, R> Read for &'_ mut R where
R: Read + ?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>,