pub struct ModularContainerBuilder<T>where
T: ServiceBinder,{ /* private fields */ }
Expand description
Builder for modular container configuration
Implementations§
Source§impl<T> ModularContainerBuilder<T>where
T: ServiceBinder,
impl<T> ModularContainerBuilder<T>where
T: ServiceBinder,
Sourcepub fn add_module<M: ServiceModule + 'static>(
self,
module: M,
) -> Result<Self, CoreError>
pub fn add_module<M: ServiceModule + 'static>( self, module: M, ) -> Result<Self, CoreError>
Add a module
Sourcepub fn add_module_with_config<M: ServiceModule + 'static>(
self,
module: M,
config: ModuleConfig,
) -> Result<Self, CoreError>
pub fn add_module_with_config<M: ServiceModule + 'static>( self, module: M, config: ModuleConfig, ) -> Result<Self, CoreError>
Add a module with configuration
Sourcepub fn add_modules<M: ServiceModule + 'static>(
self,
modules: Vec<M>,
) -> Result<Self, CoreError>
pub fn add_modules<M: ServiceModule + 'static>( self, modules: Vec<M>, ) -> Result<Self, CoreError>
Add multiple modules
Sourcepub fn build(self) -> Result<(T, ModuleRegistry), CoreError>
pub fn build(self) -> Result<(T, ModuleRegistry), CoreError>
Build the container with all modules configured
Auto Trait Implementations§
impl<T> Freeze for ModularContainerBuilder<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ModularContainerBuilder<T>
impl<T> Send for ModularContainerBuilder<T>where
T: Send,
impl<T> Sync for ModularContainerBuilder<T>where
T: Sync,
impl<T> Unpin for ModularContainerBuilder<T>where
T: Unpin,
impl<T> !UnwindSafe for ModularContainerBuilder<T>
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