pub struct ModuleLoaderBuilder { /* private fields */ }
Expand description
Builder for module loader
Implementations§
Source§impl ModuleLoaderBuilder
impl ModuleLoaderBuilder
Sourcepub fn add_module<M: Module + 'static>(self, module: M) -> Self
pub fn add_module<M: Module + 'static>(self, module: M) -> Self
Add a module
Sourcepub fn add_modules<M: Module + 'static>(self, modules: Vec<M>) -> Self
pub fn add_modules<M: Module + 'static>(self, modules: Vec<M>) -> Self
Add multiple modules
Sourcepub fn build(self) -> ModuleLoader
pub fn build(self) -> ModuleLoader
Build and return the module loader
Sourcepub async fn load(self) -> Result<Container, ModuleError>
pub async fn load(self) -> Result<Container, ModuleError>
Build, load modules, and return container
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleLoaderBuilder
impl !RefUnwindSafe for ModuleLoaderBuilder
impl Send for ModuleLoaderBuilder
impl Sync for ModuleLoaderBuilder
impl Unpin for ModuleLoaderBuilder
impl !UnwindSafe for ModuleLoaderBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more