pub trait Detector: Send + Sync {
// Required methods
fn metadata(&self) -> RuleMetadata;
fn run(&self, target: &ScanTarget) -> Vec<Finding>;
}Expand description
A detector checks a ScanTarget and produces findings.
Required Methods§
Sourcefn metadata(&self) -> RuleMetadata
fn metadata(&self) -> RuleMetadata
Metadata about this rule (id, name, severity, CWE).
Sourcefn run(&self, target: &ScanTarget) -> Vec<Finding>
fn run(&self, target: &ScanTarget) -> Vec<Finding>
Run the detector against a scan target.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".