pub enum BlockNode {
Document(Vec<BlockNode>),
Heading {
level: u8,
content: Vec<InlineNode>,
},
Paragraph(Vec<InlineNode>),
BlockQuote(Vec<BlockNode>),
CodeBlock {
language: Option<String>,
content: String,
},
UnorderedList(Vec<ListItem>),
OrderedList {
start: u32,
items: Vec<ListItem>,
},
ThematicBreak,
Table {
headers: Vec<InlineNode>,
rows: Vec<Vec<InlineNode>>,
alignments: Vec<Alignment>,
},
HtmlBlock(String),
}Expand description
Block-level node type, representing content blocks that can exist independently
Variants§
Document(Vec<BlockNode>)
Root document node, contains child block nodes
Heading
Heading, contains level (1-6) and inline content
Fields
§
content: Vec<InlineNode>Heading content, containing inline elements
Paragraph(Vec<InlineNode>)
Paragraph node, containing inline elements
BlockQuote(Vec<BlockNode>)
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
§
headers: Vec<InlineNode>Header cells
§
rows: Vec<Vec<InlineNode>>Table rows, each row containing multiple cells
HtmlBlock(String)
HTML block
Implementations§
Trait Implementations§
impl StructuralPartialEq for BlockNode
Auto Trait Implementations§
impl Freeze for BlockNode
impl RefUnwindSafe for BlockNode
impl Send for BlockNode
impl Sync for BlockNode
impl Unpin for BlockNode
impl UnwindSafe for BlockNode
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