pub trait ChangeRepository {
// Required methods
fn resolve_target_with_options(
&self,
input: &str,
options: ResolveTargetOptions,
) -> ChangeTargetResolution;
fn suggest_targets(&self, input: &str, max: usize) -> Vec<String>;
fn exists(&self, id: &str) -> bool;
fn get(&self, id: &str) -> DomainResult<Change>;
fn list(&self) -> DomainResult<Vec<ChangeSummary>>;
fn list_by_module(
&self,
module_id: &str,
) -> DomainResult<Vec<ChangeSummary>>;
fn list_incomplete(&self) -> DomainResult<Vec<ChangeSummary>>;
fn list_complete(&self) -> DomainResult<Vec<ChangeSummary>>;
fn get_summary(&self, id: &str) -> DomainResult<ChangeSummary>;
// Provided method
fn resolve_target(&self, input: &str) -> ChangeTargetResolution { ... }
}Expand description
Port for accessing change data.
Domain and adapters should depend on this interface rather than concrete storage details.
Required Methods§
Sourcefn resolve_target_with_options(
&self,
input: &str,
options: ResolveTargetOptions,
) -> ChangeTargetResolution
fn resolve_target_with_options( &self, input: &str, options: ResolveTargetOptions, ) -> ChangeTargetResolution
Resolve an input change target into a canonical change id using options.
Sourcefn suggest_targets(&self, input: &str, max: usize) -> Vec<String>
fn suggest_targets(&self, input: &str, max: usize) -> Vec<String>
Return best-effort suggestions for a change target.
Sourcefn get(&self, id: &str) -> DomainResult<Change>
fn get(&self, id: &str) -> DomainResult<Change>
Get a full change with all artifacts loaded.
Sourcefn list(&self) -> DomainResult<Vec<ChangeSummary>>
fn list(&self) -> DomainResult<Vec<ChangeSummary>>
List all changes as summaries (lightweight).
Sourcefn list_by_module(&self, module_id: &str) -> DomainResult<Vec<ChangeSummary>>
fn list_by_module(&self, module_id: &str) -> DomainResult<Vec<ChangeSummary>>
List changes belonging to a specific module.
Sourcefn list_incomplete(&self) -> DomainResult<Vec<ChangeSummary>>
fn list_incomplete(&self) -> DomainResult<Vec<ChangeSummary>>
List changes with incomplete tasks.
Sourcefn list_complete(&self) -> DomainResult<Vec<ChangeSummary>>
fn list_complete(&self) -> DomainResult<Vec<ChangeSummary>>
List changes with all tasks complete.
Sourcefn get_summary(&self, id: &str) -> DomainResult<ChangeSummary>
fn get_summary(&self, id: &str) -> DomainResult<ChangeSummary>
Get a summary for a specific change (lightweight).
Provided Methods§
Sourcefn resolve_target(&self, input: &str) -> ChangeTargetResolution
fn resolve_target(&self, input: &str) -> ChangeTargetResolution
Resolve an input change target into a canonical change id.