pub struct ProviderConfigurator { /* private fields */ }
Expand description
Provider configuration engine for automatic DI container setup
Implementations§
Source§impl ProviderConfigurator
impl ProviderConfigurator
Sourcepub fn new(container: IocContainer) -> Self
pub fn new(container: IocContainer) -> Self
Create a new provider configurator
Sourcepub fn with_conventions(
container: IocContainer,
conventions: ServiceConventions,
) -> Self
pub fn with_conventions( container: IocContainer, conventions: ServiceConventions, ) -> Self
Create a new provider configurator with custom conventions
Sourcepub fn configure_from_modules(
&mut self,
modules: &[CompileTimeModuleMetadata],
) -> Result<(), ConfigError>
pub fn configure_from_modules( &mut self, modules: &[CompileTimeModuleMetadata], ) -> Result<(), ConfigError>
Configure providers from module metadata
Sourcepub fn apply_lifetime_conventions(&mut self) -> Result<(), ConfigError>
pub fn apply_lifetime_conventions(&mut self) -> Result<(), ConfigError>
Apply lifetime conventions to providers
Sourcepub fn validate_dependencies(&self) -> Result<(), DependencyError>
pub fn validate_dependencies(&self) -> Result<(), DependencyError>
Validate all dependencies can be resolved
Sourcepub fn into_container(self) -> IocContainer
pub fn into_container(self) -> IocContainer
Get the configured container
Sourcepub fn container(&self) -> &IocContainer
pub fn container(&self) -> &IocContainer
Get reference to the container
Sourcepub fn container_mut(&mut self) -> &mut IocContainer
pub fn container_mut(&mut self) -> &mut IocContainer
Get mutable reference to the container
Sourcepub fn providers(&self) -> &[ProviderMetadata]
pub fn providers(&self) -> &[ProviderMetadata]
Get reference to the providers list
Auto Trait Implementations§
impl Freeze for ProviderConfigurator
impl !RefUnwindSafe for ProviderConfigurator
impl Send for ProviderConfigurator
impl Sync for ProviderConfigurator
impl Unpin for ProviderConfigurator
impl !UnwindSafe for ProviderConfigurator
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