pub struct ModuleRegistry { /* private fields */ }
Expand description
Module registry for managing module lifecycle and dependencies
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
Sourcepub fn new() -> ModuleRegistry
pub fn new() -> ModuleRegistry
Create a new module registry
Sourcepub fn module_count(&self) -> usize
pub fn module_count(&self) -> usize
Get the number of registered modules
Sourcepub fn get_metadata(&self, name: &str) -> Option<&ModuleMetadata>
pub fn get_metadata(&self, name: &str) -> Option<&ModuleMetadata>
Get module metadata by name
Sourcepub fn all_metadata(&self) -> Vec<&ModuleMetadata>
pub fn all_metadata(&self) -> Vec<&ModuleMetadata>
Get all module metadata
Sourcepub fn has_module(&self, name: &str) -> bool
pub fn has_module(&self, name: &str) -> bool
Check if a module is registered
Sourcepub fn resolve_dependencies(&mut self) -> Result<(), ModuleError>
pub fn resolve_dependencies(&mut self) -> Result<(), ModuleError>
Resolve module dependencies and determine loading order
Sourcepub fn configure_all(
&self,
builder: ContainerBuilder,
) -> Result<ContainerBuilder, ModuleError>
pub fn configure_all( &self, builder: ContainerBuilder, ) -> Result<ContainerBuilder, ModuleError>
Configure all modules with the container builder
Sourcepub fn boot_all(&self, container: &Container) -> Result<(), ModuleError>
pub fn boot_all(&self, container: &Container) -> Result<(), ModuleError>
Boot all modules after container is built
Sourcepub fn collect_routes(&mut self) -> Vec<RouteDefinition>
pub fn collect_routes(&mut self) -> Vec<RouteDefinition>
Collect all routes from registered modules
Sourcepub fn collect_middleware(&mut self) -> Vec<MiddlewareDefinition>
pub fn collect_middleware(&mut self) -> Vec<MiddlewareDefinition>
Collect all middleware from registered modules
Sourcepub fn modules_in_order(&self) -> Vec<&dyn Module>
pub fn modules_in_order(&self) -> Vec<&dyn Module>
Get modules in loading order
Sourcepub fn validate(&self) -> Result<(), ModuleError>
pub fn validate(&self) -> Result<(), ModuleError>
Validate all modules
Trait Implementations§
Source§impl Debug for ModuleRegistry
impl Debug for ModuleRegistry
Source§impl Default for ModuleRegistry
impl Default for ModuleRegistry
Source§fn default() -> ModuleRegistry
fn default() -> ModuleRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModuleRegistry
impl !RefUnwindSafe for ModuleRegistry
impl Send for ModuleRegistry
impl Sync for ModuleRegistry
impl Unpin for ModuleRegistry
impl !UnwindSafe for ModuleRegistry
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more