pub enum Block {
Paragraph(Vec<Inline>),
Heading(Heading),
ThematicBreak,
BlockQuote(Vec<Block>),
List(List),
CodeBlock(CodeBlock),
HtmlBlock(String),
Definition(LinkDefinition),
Table(Table),
FootnoteDefinition(FootnoteDefinition),
Empty,
}
Expand description
Block‑level constructs in the order they appear in the CommonMark spec.
Variants§
Paragraph(Vec<Inline>)
Ordinary paragraph
Heading(Heading)
ATX (# Heading
) or Setext (===
) heading
ThematicBreak
Thematic break (horizontal rule)
BlockQuote(Vec<Block>)
Block quote
List(List)
List (bullet or ordered)
CodeBlock(CodeBlock)
Fenced or indented code block
HtmlBlock(String)
Raw HTML block
Definition(LinkDefinition)
Link reference definition. Preserved for round‑tripping.
Table(Table)
Tables
FootnoteDefinition(FootnoteDefinition)
Footnote definition
Empty
Empty block. This is used to represent skipped blocks in the AST.
Trait Implementations§
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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