Skip to main content

crawlkit_plugin_sdk/
analyzer.rs

1//! Analyzer trait for plugins.
2
3use crate::context::AnalysisContext;
4use crate::finding::Finding;
5
6/// Trait for page analyzers.
7///
8/// Implement this trait to create a custom SEO analyzer.
9/// The analyzer receives page content and returns findings.
10pub trait Analyzer {
11    /// Get the analyzer name.
12    fn name(&self) -> &str;
13
14    /// Analyze the page content and return findings.
15    fn analyze(&self, ctx: &AnalysisContext) -> Vec<Finding>;
16}