pub trait ToolAdapter: Send + Sync {
// Required methods
fn tool(&self) -> Tool;
fn detect(&self, project_root: &Path) -> DetectionResult;
fn generate(&self, context: &BootstrapContext<'_>) -> Result<String>;
// Provided methods
fn validate(&self, content: &str) -> Result<()> { ... }
fn merge_strategy(&self) -> MergeStrategy { ... }
fn section_markers(&self) -> (&'static str, &'static str) { ... }
}Expand description
Tool adapter trait - implement for each supported tool
Required Methods§
Sourcefn detect(&self, project_root: &Path) -> DetectionResult
fn detect(&self, project_root: &Path) -> DetectionResult
Detect if this tool is in use in the project
Sourcefn generate(&self, context: &BootstrapContext<'_>) -> Result<String>
fn generate(&self, context: &BootstrapContext<'_>) -> Result<String>
Generate bootstrap content for this tool
Provided Methods§
Sourcefn merge_strategy(&self) -> MergeStrategy
fn merge_strategy(&self) -> MergeStrategy
Get the merge strategy for existing files
Sourcefn section_markers(&self) -> (&'static str, &'static str)
fn section_markers(&self) -> (&'static str, &'static str)
Get section markers for content preservation