Skip to main content

Detector

Trait Detector 

Source
pub trait Detector: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn detect(&self, diff: &Diff) -> Vec<Finding>;
}
Expand description

A detector inspects a parsed diff and produces zero or more findings.

Required Methods§

Source

fn name(&self) -> &'static str

Short stable identifier (e.g. "auth-gate"), used in logs and –explain output.

Source

fn detect(&self, diff: &Diff) -> Vec<Finding>

Inspect diff and return any findings this detector produces.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§