pub struct CompileTimeModuleRegistry { /* private fields */ }
Expand description
Global registry of module metadata discovered at compile time
Implementations§
Source§impl CompileTimeModuleRegistry
impl CompileTimeModuleRegistry
Sourcepub fn register_module(&mut self, metadata: CompileTimeModuleMetadata)
pub fn register_module(&mut self, metadata: CompileTimeModuleMetadata)
Register a module in the registry
Sourcepub fn all_modules(&self) -> Vec<&CompileTimeModuleMetadata>
pub fn all_modules(&self) -> Vec<&CompileTimeModuleMetadata>
Get all registered modules
Sourcepub fn find_module(&self, name: &str) -> Option<&CompileTimeModuleMetadata>
pub fn find_module(&self, name: &str) -> Option<&CompileTimeModuleMetadata>
Find a module by name
Sourcepub fn all_controllers(&self) -> Vec<String>
pub fn all_controllers(&self) -> Vec<String>
Get all controllers from all modules
Sourcepub fn all_providers(&self) -> Vec<String>
pub fn all_providers(&self) -> Vec<String>
Get all providers from all modules
Sourcepub fn modules_with_controllers(&self) -> Vec<&CompileTimeModuleMetadata>
pub fn modules_with_controllers(&self) -> Vec<&CompileTimeModuleMetadata>
Get modules that have controllers
Sourcepub fn modules_with_providers(&self) -> Vec<&CompileTimeModuleMetadata>
pub fn modules_with_providers(&self) -> Vec<&CompileTimeModuleMetadata>
Get modules that have providers
Sourcepub fn resolve_dependency_order(
&self,
) -> Result<Vec<&CompileTimeModuleMetadata>, String>
pub fn resolve_dependency_order( &self, ) -> Result<Vec<&CompileTimeModuleMetadata>, String>
Resolve module dependencies and return modules in dependency order
Sourcepub fn module_count(&self) -> usize
pub fn module_count(&self) -> usize
Get the number of registered modules
Trait Implementations§
Source§impl Clone for CompileTimeModuleRegistry
impl Clone for CompileTimeModuleRegistry
Source§fn clone(&self) -> CompileTimeModuleRegistry
fn clone(&self) -> CompileTimeModuleRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompileTimeModuleRegistry
impl Debug for CompileTimeModuleRegistry
Auto Trait Implementations§
impl Freeze for CompileTimeModuleRegistry
impl RefUnwindSafe for CompileTimeModuleRegistry
impl Send for CompileTimeModuleRegistry
impl Sync for CompileTimeModuleRegistry
impl Unpin for CompileTimeModuleRegistry
impl UnwindSafe for CompileTimeModuleRegistry
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