pub struct ControllerRegistry { /* private fields */ }
Expand description
Central registry for controller auto-registration
Implementations§
Source§impl ControllerRegistry
impl ControllerRegistry
Sourcepub fn new(container: Arc<IocContainer>) -> Self
pub fn new(container: Arc<IocContainer>) -> Self
Create a new controller registry
Sourcepub fn from_modules(
modules: &[CompileTimeModuleMetadata],
container: Arc<IocContainer>,
) -> Result<Self, BootstrapError>
pub fn from_modules( modules: &[CompileTimeModuleMetadata], container: Arc<IocContainer>, ) -> Result<Self, BootstrapError>
Build controller registry from discovered modules
Sourcepub fn register_all_routes(
&self,
router: ElifRouter,
) -> Result<ElifRouter, BootstrapError>
pub fn register_all_routes( &self, router: ElifRouter, ) -> Result<ElifRouter, BootstrapError>
Register all discovered controllers with the router
Sourcepub fn validate_routes(&self) -> Result<(), Vec<RouteConflict>>
pub fn validate_routes(&self) -> Result<(), Vec<RouteConflict>>
Validate all routes for conflicts
Sourcepub fn get_controller_metadata(&self, name: &str) -> Option<&ControllerMetadata>
pub fn get_controller_metadata(&self, name: &str) -> Option<&ControllerMetadata>
Get metadata for a specific controller
Sourcepub fn get_controller_names(&self) -> Vec<String>
pub fn get_controller_names(&self) -> Vec<String>
Get all registered controller names
Sourcepub fn total_routes(&self) -> usize
pub fn total_routes(&self) -> usize
Get total number of routes across all controllers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControllerRegistry
impl !RefUnwindSafe for ControllerRegistry
impl Send for ControllerRegistry
impl Sync for ControllerRegistry
impl Unpin for ControllerRegistry
impl !UnwindSafe for ControllerRegistry
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