pub enum Node {
Show 18 variants
Document(Vec<Node>),
Heading {
level: u8,
content: Vec<Node>,
},
Paragraph(Vec<Node>),
BlockQuote(Vec<Node>),
CodeBlock {
language: Option<String>,
content: String,
},
UnorderedList(Vec<ListItem>),
OrderedList {
start: u32,
items: Vec<ListItem>,
},
ThematicBreak,
Table {
headers: Vec<Node>,
rows: Vec<Vec<Node>>,
alignments: Vec<Alignment>,
},
Link {
url: String,
title: Option<String>,
content: Vec<Node>,
},
Image {
url: String,
title: Option<String>,
alt: String,
},
Emphasis(Vec<Node>),
Strong(Vec<Node>),
InlineCode(String),
Text(String),
Html(String),
SoftBreak,
HardBreak,
}Expand description
Represents a node type in a CommonMark document
Variants§
Document(Vec<Node>)
Root document node, containing child nodes
Heading
Heading, containing level (1-6) and content
Paragraph(Vec<Node>)
Paragraph node, containing inline elements
BlockQuote(Vec<Node>)
Block quote, containing any block-level elements
CodeBlock
Code block, containing optional language identifier and content
UnorderedList(Vec<ListItem>)
Unordered list, containing list items
OrderedList
Ordered list, containing starting number and list items
ThematicBreak
Thematic break (horizontal rule)
Table
Table
Fields
Link
Link
Fields
Image
Image
Emphasis(Vec<Node>)
Emphasis (italic)
Strong(Vec<Node>)
Strong emphasis (bold)
InlineCode(String)
Inline code
Text(String)
Plain text
Html(String)
HTML block
SoftBreak
Soft line break (single newline)
HardBreak
Hard line break (two spaces followed by newline or backslash followed by newline)
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 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