Trait LanguagePlugin
Source pub trait LanguagePlugin: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn extensions(&self) -> &'static [&'static str];
fn extract(
&self,
source: &[u8],
context: &FileContext,
) -> Result<ExtractionResult>;
// Provided methods
fn prepare_project(&self, _context: &ProjectContext) -> Result<()> { ... }
fn finish_project(&self, _context: &ProjectContext) -> Result<()> { ... }
fn discover_modules(&self, _context: &ProjectContext) -> Result<ModuleMap> { ... }
fn stamp_module(
&self,
result: ExtractionResult,
module_name: Option<&str>,
) -> ExtractionResult { ... }
fn classifiers(&self) -> Vec<Box<dyn Classifier>> { ... }
fn graph_passes(&self) -> Vec<Box<dyn GraphPass>> { ... }
}