Skip to main content

crawlkit_plugin_sdk/
context.rs

1//! Analysis context for plugins.
2
3use serde::{Deserialize, Serialize};
4
5/// Context passed to analyzers.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct AnalysisContext {
8    /// The page URL.
9    pub url: String,
10    /// The HTML content.
11    pub html: String,
12    /// HTTP status code.
13    pub status_code: Option<u16>,
14    /// Response headers.
15    pub headers: Vec<(String, String)>,
16    /// Response time in milliseconds.
17    pub response_time_ms: Option<u64>,
18}