crawlkit-plugin-sdk 1.0.0

SDK for building crawlkit WASM plugins
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Analyzer trait for plugins.

use crate::context::AnalysisContext;
use crate::finding::Finding;

/// Trait for page analyzers.
///
/// Implement this trait to create a custom SEO analyzer.
/// The analyzer receives page content and returns findings.
pub trait Analyzer {
    /// Get the analyzer name.
    fn name(&self) -> &str;

    /// Analyze the page content and return findings.
    fn analyze(&self, ctx: &AnalysisContext) -> Vec<Finding>;
}