use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use crate::Abstraction;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Gap {
pub concept: String,
pub missing_in_projects: Vec<String>,
pub severity: String,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ConceptRegistry {
concepts: HashMap<String, Vec<String>>, }
impl ConceptRegistry {
pub fn new() -> Self {
Self::default()
}
pub fn add_project(&mut self, project: &str, abstractions: Vec<Abstraction>) {
for abstraction in abstractions {
self.concepts
.entry(abstraction.name.clone())
.or_default()
.push(project.to_string());
}
}
pub fn detect_gaps(&self) -> Vec<Gap> {
vec![]
}
}