#[repr(u8)]pub enum BlockEvent {
Show 27 variants
Unparsed(Range<usize>),
VerbatimEscaping(VerbatimEscaping),
NewLine(NewLine),
Text(Range<usize>),
ThematicBreak(ThematicBreak),
EnterParagraph(BlockWithId),
EnterHeading1(BlockWithId),
EnterHeading2(BlockWithId),
EnterHeading3(BlockWithId),
EnterHeading4(BlockWithId),
EnterHeading5(BlockWithId),
EnterHeading6(BlockWithId),
EnterBlockQuote(BlockWithId),
EnterOrderedList(BlockWithId),
EnterUnorderedList(BlockWithId),
EnterListItem(BlockWithId),
EnterDescriptionList(BlockWithId),
EnterDescriptionTerm(BlockWithId),
EnterDescriptionDetails(BlockWithId),
EnterCodeBlock(BlockWithId),
EnterTable(BlockWithId),
IndicateCodeBlockCode = 22,
IndicateTableCaption = 35,
IndicateTableRow = 32,
IndicateTableHeaderCell = 33,
IndicateTableDataCell = 34,
ExitBlock(ExitBlock),
}Variants§
Unparsed(Range<usize>)
留给下个阶段解析。
VerbatimEscaping(VerbatimEscaping)
逐字文本转义。
NOTE: 内容包含开头和结尾各可能存在的一个空格,省略上述空格的处理是在块级 阶段将 VerbatimEscaping 变换为 Text 时进行。
NewLine(NewLine)
换行,在全局阶段由 CR 与 LF 而来。
Text(Range<usize>)
文本。
ThematicBreak(ThematicBreak)
分割线。
EnterParagraph(BlockWithId)
进入段落。
EnterHeading1(BlockWithId)
进入一级标题。
EnterHeading2(BlockWithId)
进入二级标题。
EnterHeading3(BlockWithId)
进入三级标题。
EnterHeading4(BlockWithId)
进入四级标题。
EnterHeading5(BlockWithId)
进入五级标题。
EnterHeading6(BlockWithId)
进入六级标题。
EnterBlockQuote(BlockWithId)
进入块引用
EnterOrderedList(BlockWithId)
进入有序列表
EnterUnorderedList(BlockWithId)
进入无序列表
EnterListItem(BlockWithId)
进入列表项
EnterDescriptionList(BlockWithId)
进入描述列表
EnterDescriptionTerm(BlockWithId)
进入描述术语
EnterDescriptionDetails(BlockWithId)
进入描述详情
EnterCodeBlock(BlockWithId)
进入代码块。
EnterTable(BlockWithId)
进入表格。
IndicateCodeBlockCode = 22
指示到达代码块的代码部分。
IndicateTableCaption = 35
指示到达表格标题。
IndicateTableRow = 32
指示到达(新)表格行。
IndicateTableHeaderCell = 33
指示到达(新)表格头部单元格。
IndicateTableDataCell = 34
指示到达(新)表格数据单元格。
ExitBlock(ExitBlock)
退出一层块级的 “进入…”。
Implementations§
Source§impl BlockEvent
impl BlockEvent
pub fn opens_inline_phase(&self) -> bool
pub fn closes_inline_phase(&self) -> bool
Trait Implementations§
Source§impl Clone for BlockEvent
impl Clone for BlockEvent
Source§fn clone(&self) -> BlockEvent
fn clone(&self) -> BlockEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockEvent
impl Debug for BlockEvent
Source§impl From<BlockEvent> for Event
impl From<BlockEvent> for Event
Source§fn from(child: BlockEvent) -> Self
fn from(child: BlockEvent) -> Self
Converts to this type from the input type.
Source§impl PartialEq<BlockEvent> for Event
impl PartialEq<BlockEvent> for Event
Source§impl PartialEq<Event> for BlockEvent
impl PartialEq<Event> for BlockEvent
Source§impl PartialEq for BlockEvent
impl PartialEq for BlockEvent
Source§impl TryFrom<Event> for BlockEvent
impl TryFrom<Event> for BlockEvent
impl Eq for BlockEvent
impl StructuralPartialEq for BlockEvent
Auto Trait Implementations§
impl Freeze for BlockEvent
impl RefUnwindSafe for BlockEvent
impl Send for BlockEvent
impl Sync for BlockEvent
impl Unpin for BlockEvent
impl UnwindSafe for BlockEvent
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