pub struct ModuleLoader { /* private fields */ }
Expand description
Module loader for orchestrating module loading process
Implementations§
Source§impl ModuleLoader
impl ModuleLoader
Sourcepub fn with_registry(registry: ModuleRegistry) -> Self
pub fn with_registry(registry: ModuleRegistry) -> Self
Create a new module loader with existing registry
Sourcepub fn register_modules<M: Module + 'static>(&mut self, modules: Vec<M>)
pub fn register_modules<M: Module + 'static>(&mut self, modules: Vec<M>)
Register multiple modules at once
Sourcepub async fn load(&mut self) -> Result<Container, ModuleError>
pub async fn load(&mut self) -> Result<Container, ModuleError>
Load all modules and create container
Sourcepub fn load_modules_only(&mut self) -> Result<(), ModuleError>
pub fn load_modules_only(&mut self) -> Result<(), ModuleError>
Load modules without creating container (for testing)
Sourcepub fn loading_stats(&self) -> &LoadingStats
pub fn loading_stats(&self) -> &LoadingStats
Get loading statistics
Sourcepub fn registry(&self) -> &ModuleRegistry
pub fn registry(&self) -> &ModuleRegistry
Get module registry
Sourcepub fn registry_mut(&mut self) -> &mut ModuleRegistry
pub fn registry_mut(&mut self) -> &mut ModuleRegistry
Get mutable module registry
Sourcepub fn routes(&mut self) -> Vec<RouteDefinition>
pub fn routes(&mut self) -> Vec<RouteDefinition>
Get all routes from loaded modules
Sourcepub fn middleware(&mut self) -> Vec<MiddlewareDefinition>
pub fn middleware(&mut self) -> Vec<MiddlewareDefinition>
Get all middleware from loaded modules
Sourcepub fn print_summary(&self)
pub fn print_summary(&self)
Print loading summary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModuleLoader
impl !RefUnwindSafe for ModuleLoader
impl Send for ModuleLoader
impl Sync for ModuleLoader
impl Unpin for ModuleLoader
impl !UnwindSafe for ModuleLoader
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