pub enum EuvMdBlock {
Heading {
level: u8,
id: &'static str,
href: &'static str,
inline: &'static [EuvMdInline],
},
Paragraph(&'static [EuvMdInline]),
CodeBlock {
lang: &'static str,
code: &'static str,
},
BlockQuote(&'static [EuvMdBlock]),
List {
ordered: bool,
items: &'static [&'static [EuvMdBlock]],
},
Table {
head: &'static [&'static [EuvMdInline]],
rows: &'static [&'static [&'static [EuvMdInline]]],
},
Container {
kind: &'static str,
title: &'static str,
blocks: &'static [EuvMdBlock],
},
Rule,
Html(&'static str),
}Expand description
One block-level markdown node of the euv_markdown AST.
The tree is plain data so build tooling can generate it as &'static
values and the renderer can walk it without allocations.
Variants§
Heading
<h1>–<h6>; href is the full permalink of the heading anchor.
Fields
§
inline: &'static [EuvMdInline]Inline content.
Paragraph(&'static [EuvMdInline])
A paragraph.
CodeBlock
A fenced code block.
BlockQuote(&'static [EuvMdBlock])
A block quote.
List
An ordered or unordered list.
Table
A GFM table.
Fields
§
head: &'static [&'static [EuvMdInline]]Header cells.
§
rows: &'static [&'static [&'static [EuvMdInline]]]Body rows.
Container
A ::: custom container.
Fields
§
blocks: &'static [EuvMdBlock]Inner blocks.
Rule
A thematic break (<hr>).
Html(&'static str)
A raw HTML block (escape hatch, rendered via inner_html).
Trait Implementations§
Source§impl Clone for EuvMdBlock
impl Clone for EuvMdBlock
Source§fn clone(&self) -> EuvMdBlock
fn clone(&self) -> EuvMdBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EuvMdBlock
Auto Trait Implementations§
impl Freeze for EuvMdBlock
impl RefUnwindSafe for EuvMdBlock
impl Send for EuvMdBlock
impl Sync for EuvMdBlock
impl Unpin for EuvMdBlock
impl UnsafeUnpin for EuvMdBlock
impl UnwindSafe for EuvMdBlock
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