pub enum Block {
Paragraph(Inlines),
List(Vec<ListItem>),
Heading(HeadingLevel, Inlines),
CodeBlock {
kind: CodeBlockKind,
code: String,
},
BlockQuote {
kind: Option<BlockQuoteKind>,
blocks: Vec<Block>,
},
Table {
alignments: Vec<Alignment>,
headers: Vec<Inlines>,
rows: Vec<Vec<Inlines>>,
},
Rule,
}Expand description
A piece of structural Markdown content. (CommonMark: blocks, container blocks)
Variants§
Paragraph(Inlines)
CommonMark: paragraphs
List(Vec<ListItem>)
CommonMark: lists
Heading(HeadingLevel, Inlines)
CommonMark: ATX heading
CodeBlock
An indented or fenced code block.
CommonMark: indented code blocks, fenced code blocks
Fields
§
kind: CodeBlockKindIndicates whether this is a fenced or indented code block.
If this CodeBlock is a fenced code block, this contains its info
string.
CommonMark: info string
BlockQuote
CommonMark: block quotes
Table
Rule
CommonMark: thematic breaks
Implementations§
Trait Implementations§
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 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