pub enum BlockEvent {
Show 30 variants
ParagraphStart,
ParagraphEnd,
HeadingStart {
level: u8,
},
HeadingEnd {
level: u8,
},
CodeBlockStart {
info: Option<Range>,
},
CodeBlockEnd,
BlockQuoteStart {
callout: Option<CalloutType>,
},
BlockQuoteEnd,
ListStart {
kind: ListKind,
tight: bool,
},
ListEnd {
kind: ListKind,
tight: bool,
},
ListItemStart {
task: TaskState,
},
ListItemEnd,
ThematicBreak,
HtmlBlockStart,
HtmlBlockEnd,
HtmlBlockText(Range),
SoftBreak,
Text(Range),
Code(Range),
VirtualSpaces(u8),
TableStart,
TableEnd,
TableHeadStart,
TableHeadEnd,
TableBodyStart,
TableBodyEnd,
TableRowStart,
TableRowEnd,
TableCellStart {
alignment: Alignment,
},
TableCellEnd,
}Expand description
Events emitted by the block parser.
Variants§
ParagraphStart
Start of a paragraph.
ParagraphEnd
End of a paragraph.
HeadingStart
Start of a heading.
HeadingEnd
End of a heading.
CodeBlockStart
Start of a fenced code block.
CodeBlockEnd
End of a fenced code block.
BlockQuoteStart
Start of a blockquote (possibly a callout/admonition).
Fields
callout: Option<CalloutType>Callout type, if this blockquote starts with [!TYPE].
BlockQuoteEnd
End of a blockquote.
ListStart
Start of a list.
Fields
ListEnd
End of a list.
ListItemStart
Start of a list item.
ListItemEnd
End of a list item.
ThematicBreak
A thematic break (horizontal rule).
HtmlBlockStart
Start of an HTML block.
HtmlBlockEnd
End of an HTML block.
HtmlBlockText(Range)
Raw HTML block content (not to be inline-parsed or escaped).
SoftBreak
Soft line break (newline within paragraph).
Text(Range)
Inline content range to be parsed by the inline parser.
Code(Range)
Raw code content (not to be inline-parsed).
VirtualSpaces(u8)
Virtual spaces to prepend to code content (from tab expansion). This event is followed by a Code or Text event.
TableStart
Start of a table.
TableEnd
End of a table.
TableHeadStart
Start of a table header section.
TableHeadEnd
End of a table header section.
TableBodyStart
Start of a table body section.
TableBodyEnd
End of a table body section.
TableRowStart
Start of a table row.
TableRowEnd
End of a table row.
TableCellStart
Start of a table cell with alignment.
TableCellEnd
End of a table cell.
Trait Implementations§
Source§impl Clone for BlockEvent
impl Clone for BlockEvent
Source§fn clone(&self) -> BlockEvent
fn clone(&self) -> BlockEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more