Skip to main content

DetectionEngine

Trait DetectionEngine 

Source
pub trait DetectionEngine: Send + Sync {
    // Required methods
    fn analyze(
        &self,
        content: &ParsedContent,
        config: &EngineConfig,
    ) -> AnalysisResult;
    fn name(&self) -> &str;
    fn can_analyze(&self, content: &ParsedContent) -> bool;
}
Expand description

Trait for detection engines (L5).

Each engine analyzes parsed content and produces findings. Engines can be composed together for comprehensive analysis.

Required Methods§

Source

fn analyze( &self, content: &ParsedContent, config: &EngineConfig, ) -> AnalysisResult

Analyze parsed content and return findings.

Source

fn name(&self) -> &str

Get the name of this engine.

Source

fn can_analyze(&self, content: &ParsedContent) -> bool

Check if this engine can analyze the given content type.

Implementors§