pub struct Document<'a> {
pub profile: Profile,
pub modules: Vec<Module>,
pub metadata: Option<Metadata<'a>>,
pub blocks: Vec<Block<'a>>,
pub span: Span,
}Expand description
A parsed LiteDoc document.
The document is the root of the AST and contains all parsed content. It preserves the parsing profile, enabled modules, optional metadata, and all content blocks.
Fields§
§profile: ProfileThe parsing profile used (may differ from parser default if @profile directive present).
modules: Vec<Module>Enabled modules from @modules directive.
metadata: Option<Metadata<'a>>Optional metadata from --- meta block.
blocks: Vec<Block<'a>>Content blocks in document order.
span: SpanSource span covering the entire document.
Trait Implementations§
impl<'a> StructuralPartialEq for Document<'a>
Auto Trait Implementations§
impl<'a> Freeze for Document<'a>
impl<'a> RefUnwindSafe for Document<'a>
impl<'a> Send for Document<'a>
impl<'a> Sync for Document<'a>
impl<'a> Unpin for Document<'a>
impl<'a> UnwindSafe for Document<'a>
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