pub struct AnalyzerRegistry { /* private fields */ }Expand description
Registry of SEO analyzers that can be run against crawled pages.
Manages a collection of Analyzer implementations and runs them
in parallel using rayon. The default registry includes 28+ analyzers
covering HTTP, SEO, content, links, images, security, accessibility,
and AI-specific checks.
§Examples
use crawlkit_engine::{CrawlConfig, analyzers::AnalyzerRegistry};
let registry = AnalyzerRegistry::new(&CrawlConfig::default());
assert!(registry.len() > 20);Implementations§
Source§impl AnalyzerRegistry
impl AnalyzerRegistry
Sourcepub fn new(_config: &CrawlConfig) -> Self
pub fn new(_config: &CrawlConfig) -> Self
Create a registry with all default analyzers.
Registers 28+ built-in analyzers covering HTTP status, redirects, canonical URLs, meta tags, headings, links, images, structured data, security, accessibility, social media, AI crawlers, and WASM patterns.
Sourcepub fn with_analyzers(analyzers: Vec<Box<dyn Analyzer>>) -> Self
pub fn with_analyzers(analyzers: Vec<Box<dyn Analyzer>>) -> Self
Create a registry with custom analyzers.
Use this when you want full control over which analyzers are run, without the default set.
Sourcepub fn register(&mut self, analyzer: Box<dyn Analyzer>)
pub fn register(&mut self, analyzer: Box<dyn Analyzer>)
Add an analyzer to the registry.
Custom analyzers are appended to the end and run after all previously registered analyzers.
Sourcepub fn analyze(
&self,
ctx: &AnalysisContext<'_>,
config: &CrawlConfig,
) -> Vec<Finding>
pub fn analyze( &self, ctx: &AnalysisContext<'_>, config: &CrawlConfig, ) -> Vec<Finding>
Run all analyzers on a page and collect findings.
Analyzers run in parallel via rayon for performance. Returns a
flat list of all Findings from all analyzers.
Auto Trait Implementations§
impl !RefUnwindSafe for AnalyzerRegistry
impl !UnwindSafe for AnalyzerRegistry
impl Freeze for AnalyzerRegistry
impl Send for AnalyzerRegistry
impl Sync for AnalyzerRegistry
impl Unpin for AnalyzerRegistry
impl UnsafeUnpin for AnalyzerRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more