[−][src]Struct rhai::module_resolvers::ModuleResolversCollection
Module resolution service that holds a collection of module resolves, to be searched in sequential order.
Examples
use rhai::{Engine, Module}; use rhai::module_resolvers::{StaticModuleResolver, ModuleResolversCollection}; let mut collection = ModuleResolversCollection::new(); let resolver = StaticModuleResolver::new(); collection.push(resolver); let mut engine = Engine::new(); engine.set_module_resolver(Some(collection));
Implementations
impl ModuleResolversCollection
[src]
pub fn new() -> Self
[src]
Create a new ModuleResolversCollection
.
Examples
use rhai::{Engine, Module}; use rhai::module_resolvers::{StaticModuleResolver, ModuleResolversCollection}; let mut collection = ModuleResolversCollection::new(); let resolver = StaticModuleResolver::new(); collection.push(resolver); let mut engine = Engine::new(); engine.set_module_resolver(Some(collection));
impl ModuleResolversCollection
[src]
pub fn push(&mut self, resolver: impl ModuleResolver + 'static)
[src]
Add a module keyed by its path.
pub fn iter(&self) -> impl Iterator<Item = &dyn ModuleResolver>
[src]
Get an iterator of all the module resolvers.
pub fn clear(&mut self)
[src]
Remove all module resolvers.
Trait Implementations
impl Default for ModuleResolversCollection
[src]
impl ModuleResolver for ModuleResolversCollection
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ModuleResolversCollection
impl !Send for ModuleResolversCollection
impl !Sync for ModuleResolversCollection
impl Unpin for ModuleResolversCollection
impl !UnwindSafe for ModuleResolversCollection
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,
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: Unpin + Future + ?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: Unpin + Future + ?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,
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: Unpin + Future + ?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: Unpin + Future + ?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, 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.
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>,