Skip to main content

Analyzer

Trait Analyzer 

Source
pub trait Analyzer: Send + Sync {
    // Required methods
    fn manifest(&self) -> &AnalyzerManifest;
    fn analyze(&self, ctx: &AnalyzeCtx<'_>) -> Result<Vec<RecDraft>>;
}
Expand description

An analysis unit. Object-safe so builtin_analyzers() yields trait objects.

Required Methods§

Source

fn manifest(&self) -> &AnalyzerManifest

Source

fn analyze(&self, ctx: &AnalyzeCtx<'_>) -> Result<Vec<RecDraft>>

Produce recommendation drafts. dedup_key, origin, and the params snapshot are stamped by the engine afterward, not here. Returning an error drops this analyzer’s findings for the run; other analyzers are unaffected.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§