Skip to main content

LayoutParser

Trait LayoutParser 

Source
pub trait LayoutParser: Send + Sync {
    // Required methods
    fn parse(&self, content: &str) -> DocumentStructure;
    fn supports_format(&self, format: &str) -> bool;
    fn name(&self) -> &'static str;
}
Expand description

Trait for document layout parsers

Required Methods§

Source

fn parse(&self, content: &str) -> DocumentStructure

Parse document structure from content

Source

fn supports_format(&self, format: &str) -> bool

Check if this parser supports a given format

Source

fn name(&self) -> &'static str

Get parser name

Implementors§