Skip to main content

Parser

Trait Parser 

Source
pub trait Parser: Send + Sync {
    // Required methods
    fn parse(&self, path: &Path) -> Result<String>;
    fn supported_extensions(&self) -> &[&str];
}
Expand description

Trait for document parsers

Required Methods§

Source

fn parse(&self, path: &Path) -> Result<String>

Parse a file and return its text content

Source

fn supported_extensions(&self) -> &[&str]

Get supported file extensions

Implementors§