Struct springtime_di::factory::ComponentFactoryBuilder
source · pub struct ComponentFactoryBuilder { /* private fields */ }Expand description
Builder for ComponentFactory with sensible defaults, for easy construction.
Implementations§
source§impl ComponentFactoryBuilder
impl ComponentFactoryBuilder
sourcepub fn new() -> Result<Self, ComponentDefinitionRegistryError>
pub fn new() -> Result<Self, ComponentDefinitionRegistryError>
Creates a new builder with a default configuration.
sourcepub fn with_definition_registry(
self,
definition_registry: ComponentDefinitionRegistryPtr
) -> Self
pub fn with_definition_registry( self, definition_registry: ComponentDefinitionRegistryPtr ) -> Self
Sets new ComponentDefinitionRegistry.
sourcepub fn with_scope_factories(self, scope_factories: ScopeFactoryRegistry) -> Self
pub fn with_scope_factories(self, scope_factories: ScopeFactoryRegistry) -> Self
Sets new scope factories.
sourcepub fn with_scope_factory<T: ToString>(
self,
name: T,
factory: ScopeFactoryPtr
) -> Self
pub fn with_scope_factory<T: ToString>( self, name: T, factory: ScopeFactoryPtr ) -> Self
Adds a new scope factory.
sourcepub fn build(self) -> ComponentFactory
pub fn build(self) -> ComponentFactory
Builds resulting ComponentFactory.
Auto Trait Implementations§
impl !RefUnwindSafe for ComponentFactoryBuilder
impl Send for ComponentFactoryBuilder
impl Sync for ComponentFactoryBuilder
impl Unpin for ComponentFactoryBuilder
impl !UnwindSafe for ComponentFactoryBuilder
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