Skip to main content

Module module_registry

Module module_registry 

Source
Expand description

Module Registry - Discovery and management of Backbone modules

The Module Registry provides centralized registration of modules, automatic migration discovery, and dependency-ordered initialization.

§Architecture

                   ┌────────────────────────────┐
                   │      ModuleRegistry        │
                   │   (Application Bootstrap)  │
                   └────────────────────────────┘
                             │
             ┌───────────────┼───────────────┐
             │               │               │
             ▼               ▼               ▼
    ┌────────────┐  ┌────────────┐  ┌────────────┐
    │  Sapiens   │  │  Bersihir  │  │  Bucket    │
    │  Module    │  │  Module    │  │  Module    │
    └────────────┘  └────────────┘  └────────────┘

§Usage

ⓘ
use backbone_core::module_registry::ModuleRegistry;
use backbone_core::module::BackboneModule;

// Create registry
let mut registry = ModuleRegistry::new();

// Register modules
registry.register(SapiensModule::new());
registry.register(BersihirModule::new());

// Get modules in dependency order
for module in registry.modules_ordered() {
    // Run migrations, initialize, etc.
}

// Get all migration paths
for (name, path) in registry.all_migration_paths() {
    println!("Module {}: {}", name, path.display());
}

Structs§

ModuleRegistry
Registry for managing Backbone modules

Enums§

ModuleRegistryError
Error types for module registry operations

Type Aliases§

ModuleRegistryResult
Result type for module registry operations