1 2 3 4 5 6 7 8 9 10 11 12
use crate::config::ProjectConfig; use crate::models::Service; use anyhow::Result; use async_trait::async_trait; use std::path::Path; #[async_trait] pub trait DetectorTrait: Send + Sync { fn name(&self) -> &str; fn priority(&self) -> i32; async fn detect(&self, project_path: &Path, config: Option<&ProjectConfig>) -> Result<Vec<Service>>; }