Struct ketos::module::FileModuleLoader
[−]
[src]
pub struct FileModuleLoader { // some fields omitted }
Loads modules from source files and compiled bytecode files.
Methods
impl FileModuleLoader
[src]
fn new() -> FileModuleLoader
Creates a new FileModuleLoader
that will search the current
directory for modules.
fn with_search_paths(paths: Vec<PathBuf>) -> FileModuleLoader
Creates a new FileModuleLoader
that will search the given series
of directories to load modules.
fn add_search_path(&mut self, path: PathBuf)
Adds a directory to search for module files.
fn set_read_bytecode(&mut self, set: bool)
Sets whether the FileModuleLoader
will search for compiled bytecode
files when loading modules. The default is true
.
fn set_write_bytecode(&mut self, set: bool)
Sets whether the FileModuleLoader
will write compiled bytecode
files after loading a module from source. The default is true
.
Trait Implementations
impl ModuleLoader for FileModuleLoader
[src]
fn load_module(&self, name: Name, scope: Scope) -> Result<Module, Error>
Loads the named module, supplying a Scope
to use as its namespace. 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