pub struct LazyModuleLoader { /* private fields */ }Expand description
Nest-style lazy module loader for provider-only module graphs.
Implementations§
Source§impl LazyModuleLoader
impl LazyModuleLoader
Sourcepub fn load<M>(&self, module: M) -> Result<LazyLoadedModule>where
M: Module,
pub fn load<M>(&self, module: M) -> Result<LazyLoadedModule>where
M: Module,
Load a module on demand and return its provider container.
Lazy-loaded modules are provider-only: controllers, routes, gateways, middleware, message patterns, and lifecycle hooks are not registered. Newly loaded global modules are rejected because changing global visibility after singleton initialization would make the existing provider graph inconsistent.
Sourcepub fn load_arc(&self, module: Arc<dyn Module>) -> Result<LazyLoadedModule>
pub fn load_arc(&self, module: Arc<dyn Module>) -> Result<LazyLoadedModule>
Load a shared module on demand and return its provider container.
Sourcepub async fn load_async<M>(&self, module: M) -> Result<LazyLoadedModule>where
M: Module,
pub async fn load_async<M>(&self, module: M) -> Result<LazyLoadedModule>where
M: Module,
Load a module with async singleton provider factories on demand.
Sourcepub async fn load_arc_async(
&self,
module: Arc<dyn Module>,
) -> Result<LazyLoadedModule>
pub async fn load_arc_async( &self, module: Arc<dyn Module>, ) -> Result<LazyLoadedModule>
Load a shared module with async singleton provider factories on demand.
Trait Implementations§
Source§impl Clone for LazyModuleLoader
impl Clone for LazyModuleLoader
Source§fn clone(&self) -> LazyModuleLoader
fn clone(&self) -> LazyModuleLoader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LazyModuleLoader
impl RefUnwindSafe for LazyModuleLoader
impl Send for LazyModuleLoader
impl Sync for LazyModuleLoader
impl Unpin for LazyModuleLoader
impl UnsafeUnpin for LazyModuleLoader
impl UnwindSafe for LazyModuleLoader
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