pub struct ControllerRegistryBuilder { /* private fields */ }
Expand description
Builder for controller registry
Implementations§
Source§impl ControllerRegistryBuilder
impl ControllerRegistryBuilder
Sourcepub fn container(self, container: Arc<IocContainer>) -> Self
pub fn container(self, container: Arc<IocContainer>) -> Self
Set the IoC container
Sourcepub fn register<T>(self, name: &str) -> Selfwhere
T: ElifController + IocControllable + 'static,
pub fn register<T>(self, name: &str) -> Selfwhere
T: ElifController + IocControllable + 'static,
Register a controller type
Sourcepub fn register_factory(
self,
name: &str,
factory: Box<dyn ControllerFactory>,
) -> Self
pub fn register_factory( self, name: &str, factory: Box<dyn ControllerFactory>, ) -> Self
Register a custom factory
Sourcepub fn build(self) -> Result<ControllerRegistry, HttpError>
pub fn build(self) -> Result<ControllerRegistry, HttpError>
Build the controller registry
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControllerRegistryBuilder
impl !RefUnwindSafe for ControllerRegistryBuilder
impl Send for ControllerRegistryBuilder
impl Sync for ControllerRegistryBuilder
impl Unpin for ControllerRegistryBuilder
impl !UnwindSafe for ControllerRegistryBuilder
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