pub trait Parser: Send + Sync {
// Required methods
fn extensions(&self) -> &[&str];
fn source_type(&self) -> SourceType;
fn parse(&self, path: &Path, content: &str) -> Result<Document>;
}Expand description
Trait for document parsers.
Required Methods§
Sourcefn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this parser handles (without dot, lowercase).
Sourcefn source_type(&self) -> SourceType
fn source_type(&self) -> SourceType
Source type for parsed documents.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".