pub enum Node {
Show 16 variants
Heading {
level: u8,
children: Vec<Node>,
},
Paragraph {
children: Vec<Node>,
},
FencedCode {
lang: String,
content: String,
},
InlineCode {
content: String,
},
BlockQuote {
children: Vec<Node>,
},
List {
ordered: bool,
items: Vec<Node>,
},
ListItem {
children: Vec<Node>,
},
Emphasis {
children: Vec<Node>,
},
Strong {
children: Vec<Node>,
},
Link {
href: String,
title: String,
children: Vec<Node>,
},
Image {
src: String,
alt: String,
},
HorizontalRule,
HardBreak,
SoftBreak,
Text(String),
Html(String),
}Expand description
A single node in the Markdown AST.
Variants§
Heading
A heading with a numeric level (1–6) and inline children.
Paragraph
A block of inline content.
FencedCode
A fenced code block with an optional language tag.
InlineCode
Inline code span.
BlockQuote
A block quote containing block children.
List
An ordered or unordered list.
ListItem
A list item containing block children.
Emphasis
Emphasised (italic) inline content.
Strong
Strong (bold) inline content.
Link
A hyperlink.
Image
An image.
HorizontalRule
A thematic break (--- / ***).
HardBreak
A hard line break (\\\n).
SoftBreak
A soft line break (single newline in source).
Text(String)
Plain text.
Html(String)
Raw HTML.
Trait Implementations§
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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