Enum BlockEvent

Source
#[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§

Trait Implementations§

Source§

impl Clone for BlockEvent

Source§

fn clone(&self) -> BlockEvent

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BlockEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<BlockEvent> for Event

Source§

fn from(child: BlockEvent) -> Self

Converts to this type from the input type.
Source§

impl PartialEq<BlockEvent> for Event

Source§

fn eq(&self, other: &BlockEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq<Event> for BlockEvent

Source§

fn eq(&self, other: &Event) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for BlockEvent

Source§

fn eq(&self, other: &BlockEvent) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<Event> for BlockEvent

Source§

type Error = BlockEventConvertError

The type returned in the event of a conversion error.
Source§

fn try_from(parent: Event) -> Result<Self, <Self as TryFrom<Event>>::Error>

Performs the conversion.
Source§

impl Eq for BlockEvent

Source§

impl StructuralPartialEq for BlockEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.