Skip to main content

ContentProcessor

Trait ContentProcessor 

Source
pub trait ContentProcessor: Send + Sync {
    // Required methods
    fn can_process(
        &self,
        extractor_type: ExtractorType,
        raw_text: &str,
        config: &ParserConfig,
    ) -> bool;
    fn process(&self, raw_text: &str, config: &ParserConfig) -> Result<String>;
}
Expand description

Content preprocessor hook.

Required Methods§

Source

fn can_process( &self, extractor_type: ExtractorType, raw_text: &str, config: &ParserConfig, ) -> bool

Returns whether this processor should run.

Source

fn process(&self, raw_text: &str, config: &ParserConfig) -> Result<String>

Processes manifest text.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§