Struct ketos::module::ChainModuleLoader
[−]
[src]
pub struct ChainModuleLoader<A, B> { // some fields omitted }
A chained module loader contains two ModuleLoader
implementations.
It will attempt to load a module from the first loader and, if the loader fails to find a module, it will attempt to load the module from the second loader.
If the first module loader encounters an error while loading the desired module (e.g. a compile error in a file), the chain loader will return the error immediately, without attempting the second loader.
Trait Implementations
impl<A, B> ModuleLoader for ChainModuleLoader<A, B> where A: ModuleLoader, B: ModuleLoader
[src]
fn load_module(&self, name: Name, ctx: Context) -> Result<Module, Error>
Loads the named module, supplying a new execution context. Read more
fn chain<T: ModuleLoader>(self, second: T) -> ChainModuleLoader<Self, T> where Self: Sized
Creates a ChainModuleLoader
using this loader and another. Read more