Struct rhai::module_resolvers::ModuleResolversCollection
source ·
[−]pub struct ModuleResolversCollection(_);
Expand description
Module resolution service that holds a collection of module resolvers, to be searched in sequential order.
Example
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(collection);
Implementations
Create a new ModuleResolversCollection
.
Example
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(collection);
Append a module resolver to the end.
Remove the last module resolver from the end, if any.
Get an iterator of all the module resolvers.
Remove all module resolvers.
Is this ModuleResolversCollection
empty?
Get the number of module resolvers in this ModuleResolversCollection
.
Add another ModuleResolversCollection
to the end of this collection.
The other ModuleResolversCollection
is consumed.