[−][src]Struct ketos::module::FileModuleLoader
Loads modules from source files and compiled bytecode files.
Methods
impl FileModuleLoader
[src]
pub fn new() -> FileModuleLoader
[src]
Creates a new FileModuleLoader
that will search the current
directory for modules.
pub fn with_search_paths(paths: Vec<PathBuf>) -> FileModuleLoader
[src]
Creates a new FileModuleLoader
that will search the given series
of directories to load modules.
pub fn add_search_path(&mut self, path: PathBuf)
[src]
Adds a directory to search for module files.
pub fn set_read_bytecode(&mut self, set: bool)
[src]
Sets whether the FileModuleLoader
will search for compiled bytecode
files when loading modules. The default is true
.
pub fn set_write_bytecode(&mut self, set: bool)
[src]
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, ctx: Context) -> Result<Module, Error>
[src]
fn chain<T: ModuleLoader>(self, second: T) -> ChainModuleLoader<Self, T> where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl !RefUnwindSafe for FileModuleLoader
impl Send for FileModuleLoader
impl !Sync for FileModuleLoader
impl Unpin for FileModuleLoader
impl UnwindSafe for FileModuleLoader
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,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,