Skip to main content

Extractor

Trait Extractor 

Source
pub trait Extractor: Send + Sync {
    // Required method
    fn extract(
        &self,
        html: &str,
        selector: &str,
    ) -> Result<Vec<ExtractedNode>, KumoError>;
}
Expand description

Extension point for pluggable extraction strategies.

The default implementation (CssExtractor) uses CSS selectors via scraper. Future crates can implement XPath or LLM-based extraction without touching core kumo code.

Required Methods§

Source

fn extract( &self, html: &str, selector: &str, ) -> Result<Vec<ExtractedNode>, KumoError>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§