ToolAdapter

Trait ToolAdapter 

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

Source

fn tool(&self) -> Tool

Get the tool identifier

Source

fn detect(&self, project_root: &Path) -> DetectionResult

Detect if this tool is in use in the project

Source

fn generate(&self, context: &BootstrapContext<'_>) -> Result<String>

Generate bootstrap content for this tool

Provided Methods§

Source

fn validate(&self, content: &str) -> Result<()>

Validate generated content

Source

fn merge_strategy(&self) -> MergeStrategy

Get the merge strategy for existing files

Source

fn section_markers(&self) -> (&'static str, &'static str)

Get section markers for content preservation

Implementors§