Skip to main content

ContextPlugin

Trait ContextPlugin 

Source
pub trait ContextPlugin: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn detect(&self, directory: &Path) -> bool;
    fn enrich(&self, file_path: &Path, base_bones: &mut Vec<Bone>) -> Result<()>;
}
Expand description

A plugin that can enrich extracted code bones with domain-specific metadata.

Required Methods§

Source

fn name(&self) -> &str

The unique name of the plugin (e.g., “dbt”, “openapi”).

Source

fn detect(&self, directory: &Path) -> bool

Returns true if this plugin should be active for the given directory/workspace.

Source

fn enrich(&self, file_path: &Path, base_bones: &mut Vec<Bone>) -> Result<()>

Enriches the extracted bones for a specific file with additional metadata. The plugin can modify the base_bones in place (e.g., adding JSON metadata).

Implementors§