pub struct Document {
pub raw_metadata: Option<String>,
pub metadata_format: Option<FrontmatterFormat>,
pub frontmatter: Option<Frontmatter>,
pub html: String,
pub headings: Vec<Heading>,
pub reqs: Vec<ReqDefinition>,
pub code_samples: Vec<CodeSample>,
pub elements: Vec<DocElement>,
pub head_injections: Vec<String>,
pub inline_code_spans: Vec<InlineCodeSpan>,
}Expand description
A rendered markdown document.
Fields§
§raw_metadata: Option<String>Raw metadata content (without delimiters)
metadata_format: Option<FrontmatterFormat>Detected metadata format
frontmatter: Option<Frontmatter>Parsed frontmatter (if present) - convenience accessor
html: StringRendered HTML content
headings: Vec<Heading>Extracted headings for TOC generation
reqs: Vec<ReqDefinition>Extracted requirement definitions
code_samples: Vec<CodeSample>Code samples found in the document
elements: Vec<DocElement>All document elements (headings and requirements) in document order. Useful for building hierarchical structures like outlines with coverage.
head_injections: Vec<String>HTML snippets to inject into the page’s <head> (or body end).
Already deduplicated by key during rendering.
inline_code_spans: Vec<InlineCodeSpan>All inline code spans (backtick-delimited) found in the document. Spans include byte offsets covering the backtick delimiters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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