pub trait ModuleScriptLoader {
    // Required method
    fn load_script(&mut self, name: String) -> Option<String>;
}
Expand description

Enables one to enable module loading for Wren

Required Methods§

source

fn load_script(&mut self, name: String) -> Option<String>

Takes a desired module name

Returns
  • Some(String) containing the Wren source if the module exists
  • None if not

Implementors§

source§

impl ModuleScriptLoader for BasicFileLoader

Enable to load wren scripts from a base directory

source§

impl ModuleScriptLoader for NullLoader

source§

impl<T> ModuleScriptLoader for T
where T: FnMut(String) -> Option<String>,