pub trait L2Engine: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn finding_types(&self) -> &[&'static str];
fn analyze(&self, ctx: &L2Context) -> L2AnalyzerOutput;
// Provided method
fn languages(&self) -> &[Language] { ... }
}Expand description
Trait for L2 deep-analysis engines.
Implementations must be object-safe so they can be stored as
Box<dyn L2Engine> in the engine registry. Each engine declares:
- A unique name for logging and identification
- The finding types it can produce (e.g.,
["null-deref", "uninitialized-read"]) - Which languages it supports (empty means language-agnostic)
- The analysis entry point
Required Methods§
Sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
Unique human-readable name for this engine (used in logging and reports).
Sourcefn finding_types(&self) -> &[&'static str]
fn finding_types(&self) -> &[&'static str]
The set of finding type identifiers this engine can produce.
Sourcefn analyze(&self, ctx: &L2Context) -> L2AnalyzerOutput
fn analyze(&self, ctx: &L2Context) -> L2AnalyzerOutput
Run analysis on the provided context and return findings.