pub trait ModuleRepository {
// Required methods
fn exists(&self, id: &str) -> bool;
fn get(&self, id_or_name: &str) -> Result<Module, DomainError>;
fn list(&self) -> Result<Vec<ModuleSummary>, DomainError>;
}Expand description
Port for accessing module data.
Domain and adapters should depend on this interface rather than concrete storage details.
Required Methods§
Sourcefn get(&self, id_or_name: &str) -> Result<Module, DomainError>
fn get(&self, id_or_name: &str) -> Result<Module, DomainError>
Get a module by ID or full name.
Sourcefn list(&self) -> Result<Vec<ModuleSummary>, DomainError>
fn list(&self) -> Result<Vec<ModuleSummary>, DomainError>
List all modules.