pub struct ParserRegistry { /* private fields */ }Expand description
Registry for content parsers with auto-detection.
Implementations§
Source§impl ParserRegistry
impl ParserRegistry
Sourcepub fn with_theme(theme: &str) -> Self
pub fn with_theme(theme: &str) -> Self
Create a parser registry with a custom syntax theme.
Sourcepub fn parse(&self, content: &str, path: &Path) -> Result<ParsedContent>
pub fn parse(&self, content: &str, path: &Path) -> Result<ParsedContent>
Parse content, auto-detecting the parser from file extension.
Sourcepub fn markdown(&self) -> &MarkdownParser
pub fn markdown(&self) -> &MarkdownParser
Get the markdown parser.
Sourcepub fn typst(&self) -> &TypstParser
pub fn typst(&self) -> &TypstParser
Get the typst parser.
Trait Implementations§
Source§impl Debug for ParserRegistry
impl Debug for ParserRegistry
Auto Trait Implementations§
impl !Freeze for ParserRegistry
impl RefUnwindSafe for ParserRegistry
impl Send for ParserRegistry
impl Sync for ParserRegistry
impl Unpin for ParserRegistry
impl UnwindSafe for ParserRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more