pub trait Parser {
// Required methods
fn matches(&self, path: &str) -> bool;
fn parse(&self, path: &str, content: &str) -> ParseResult;
}Expand description
Trait implemented by the built-in text parsers.
Required Methods§
Sourcefn matches(&self, path: &str) -> bool
fn matches(&self, path: &str) -> bool
Check whether this parser should run on a given file path.
Sourcefn parse(&self, path: &str, content: &str) -> ParseResult
fn parse(&self, path: &str, content: &str) -> ParseResult
Parse a file’s content and return discovered links + optional metadata.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".