Skip to main content

ModuleRepository

Trait ModuleRepository 

Source
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§

Source

fn exists(&self, id: &str) -> bool

Check if a module exists.

Source

fn get(&self, id_or_name: &str) -> Result<Module, DomainError>

Get a module by ID or full name.

Source

fn list(&self) -> Result<Vec<ModuleSummary>, DomainError>

List all modules.

Implementors§