pub trait ContentParser: Send + Sync {
// Required methods
fn parse(&self, content: &str, path: &str) -> Result<ParsedContent>;
fn supported_extensions(&self) -> &[&str];
// Provided method
fn can_parse(&self, path: &str) -> bool { ... }
}Expand description
Trait for content parsers (L4).
Each parser handles a specific file format and extracts structured data for the detection engine.
Required Methods§
Sourcefn supported_extensions(&self) -> &[&str]
fn supported_extensions(&self) -> &[&str]
Get the file extensions this parser supports.