pub struct Document {
pub meta: NodeMeta,
pub children: Vec<Block>,
}Expand description
The root of a parsed document: a sequence of top-level Blocks.
Fields§
§meta: NodeMetaNode metadata (source span).
children: Vec<Block>The document’s top-level blocks, in source order.
Implementations§
Source§impl Document
impl Document
Sourcepub fn to_markdown(&self) -> Result<String, SerializeError>
pub fn to_markdown(&self) -> Result<String, SerializeError>
Serialize this document to canonical Markdown with default options.
Sourcepub fn to_markdown_with(
&self,
options: &SerializeOptions,
) -> Result<String, SerializeError>
pub fn to_markdown_with( &self, options: &SerializeOptions, ) -> Result<String, SerializeError>
Serialize this document to canonical Markdown with explicit options.
Trait Implementations§
impl Eq for Document
impl StructuralPartialEq for Document
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