pub struct TypstParser { /* private fields */ }Expand description
Typst parser that extracts frontmatter and prepares content for compilation.
Note: Full Typst compilation requires a proper World implementation with file system access and font loading. This parser focuses on:
- Extracting frontmatter from Typst comment syntax
- Extracting TOC from heading patterns
- Preparing content for later compilation
Implementations§
Source§impl TypstParser
impl TypstParser
Sourcepub fn parse(&self, content: &str, path: &Path) -> Result<ParsedContent>
pub fn parse(&self, content: &str, path: &Path) -> Result<ParsedContent>
Parse a Typst document with frontmatter.
This extracts frontmatter and TOC but does not perform full compilation. The HTML field will contain the raw Typst source wrapped in a code block for preview, or can be compiled later with a proper World implementation.
Trait Implementations§
Source§impl ContentParser for TypstParser
impl ContentParser for TypstParser
Source§impl Debug for TypstParser
impl Debug for TypstParser
Auto Trait Implementations§
impl Freeze for TypstParser
impl RefUnwindSafe for TypstParser
impl Send for TypstParser
impl Sync for TypstParser
impl Unpin for TypstParser
impl UnwindSafe for TypstParser
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