pub enum Block {
Show 17 variants
Paragraph(Paragraph),
Heading(Heading),
ThematicBreak(ThematicBreak),
BlockQuote(BlockQuote),
Alert(Alert),
List(List),
CodeBlock(CodeBlock),
HtmlBlock(HtmlBlock),
HtmlContainer(HtmlContainer),
Definition(Definition),
FootnoteDefinition(FootnoteDefinition),
Table(Table),
MathBlock(MathBlock),
Frontmatter(Frontmatter),
LeafDirective(LeafDirective),
ContainerDirective(ContainerDirective),
BlankLine(BlankLine),
}Expand description
A block-level node: the building blocks of a document’s vertical structure.
Variants§
Paragraph(Paragraph)
A paragraph of inline content.
Heading(Heading)
An ATX (# h) or setext (underlined) heading.
ThematicBreak(ThematicBreak)
A thematic break / horizontal rule: ---, ***, or ___.
BlockQuote(BlockQuote)
A block quote: lines prefixed with > .
Alert(Alert)
A GFM alert / admonition: > [!NOTE] etc.
List(List)
A bullet or ordered list.
CodeBlock(CodeBlock)
A fenced (```) or indented code block.
HtmlBlock(HtmlBlock)
A raw HTML block.
HtmlContainer(HtmlContainer)
A structured raw HTML container whose interior is parsed as Markdown.
Definition(Definition)
A link reference definition: [label]: url "title".
FootnoteDefinition(FootnoteDefinition)
A footnote definition: [^id]: text.
Table(Table)
A GFM pipe table.
MathBlock(MathBlock)
A display math block: $$ … $$.
Frontmatter(Frontmatter)
A leading frontmatter block (--- YAML or +++ TOML).
LeafDirective(LeafDirective)
A leaf directive: ::name[label]{attrs}.
ContainerDirective(ContainerDirective)
A container directive: :::name … :::.
BlankLine(BlankLine)
A blank line beyond the one that separates two blocks.
Implementations§
Trait Implementations§
impl Eq for Block
Source§impl From<BlockQuote> for Block
impl From<BlockQuote> for Block
Source§fn from(node: BlockQuote) -> Self
fn from(node: BlockQuote) -> Self
Converts to this type from the input type.
Source§impl From<ContainerDirective> for Block
impl From<ContainerDirective> for Block
Source§fn from(node: ContainerDirective) -> Self
fn from(node: ContainerDirective) -> Self
Converts to this type from the input type.
Source§impl From<Definition> for Block
impl From<Definition> for Block
Source§fn from(node: Definition) -> Self
fn from(node: Definition) -> Self
Converts to this type from the input type.
Source§impl From<FootnoteDefinition> for Block
impl From<FootnoteDefinition> for Block
Source§fn from(node: FootnoteDefinition) -> Self
fn from(node: FootnoteDefinition) -> Self
Converts to this type from the input type.
Source§impl From<Frontmatter> for Block
impl From<Frontmatter> for Block
Source§fn from(node: Frontmatter) -> Self
fn from(node: Frontmatter) -> Self
Converts to this type from the input type.
Source§impl From<HtmlContainer> for Block
impl From<HtmlContainer> for Block
Source§fn from(node: HtmlContainer) -> Self
fn from(node: HtmlContainer) -> Self
Converts to this type from the input type.
Source§impl From<LeafDirective> for Block
impl From<LeafDirective> for Block
Source§fn from(node: LeafDirective) -> Self
fn from(node: LeafDirective) -> Self
Converts to this type from the input type.
Source§impl From<ThematicBreak> for Block
impl From<ThematicBreak> for Block
Source§fn from(node: ThematicBreak) -> Self
fn from(node: ThematicBreak) -> Self
Converts to this type from the input type.
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 UnsafeUnpin 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