FormatHandler

Trait FormatHandler 

Source
pub trait FormatHandler: Send + Sync {
    // Required methods
    fn extract_content(
        &self,
        data: &[u8],
        config: &ContentExtractionConfig,
    ) -> Result<ExtractedContent>;
    fn can_handle(&self, data: &[u8]) -> bool;
    fn supported_extensions(&self) -> Vec<&'static str>;
}
Expand description

Trait for format-specific content handlers

Required Methods§

Source

fn extract_content( &self, data: &[u8], config: &ContentExtractionConfig, ) -> Result<ExtractedContent>

Extract content from document bytes

Source

fn can_handle(&self, data: &[u8]) -> bool

Check if this handler can process the given data

Source

fn supported_extensions(&self) -> Vec<&'static str>

Get supported file extensions

Implementors§

Source§

impl FormatHandler for AudioHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for CsvHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for DocxHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for FallbackHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for HtmlHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for ImageHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for JsonHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for MarkdownHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for PdfHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for PlainTextHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for PptxHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for VideoHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for XlsxHandler

Available on crate feature content-processing only.
Source§

impl FormatHandler for XmlHandler

Available on crate feature content-processing only.