Trait FileAnalyzer

Source
pub trait FileAnalyzer {
    // Required methods
    fn analyze(
        &self,
        file_path: &Path,
        content: &str,
    ) -> GuardianResult<Vec<Violation>>;
    fn handles_file(&self, file_path: &Path) -> bool;
}
Expand description

Trait for custom file analyzers

Required Methods§

Source

fn analyze( &self, file_path: &Path, content: &str, ) -> GuardianResult<Vec<Violation>>

Analyze a file and return violations

Source

fn handles_file(&self, file_path: &Path) -> bool

Check if this analyzer handles the given file type

Implementors§