pub enum MarkdownNode {
Heading {
level: HeadingLevel,
text: Text,
},
Paragraph {
text: Text,
},
BlockQuote {
kind: Option<BlockQuoteKind>,
nodes: Vec<Node>,
},
CodeBlock {
lang: Option<String>,
text: Text,
},
List {
kind: ListKind,
nodes: Vec<Node>,
},
Item {
text: Text,
},
TaskListItem {
kind: TaskListItemKind,
text: Text,
},
}Expand description
The Markdown AST node enumeration.
Variants§
Heading
A heading node that represents different heading levels.
The level is controlled with the HeadingLevel definition.
Paragraph
A paragraph
BlockQuote
A block quote node that represents different quote block variants including callout blocks.
The variant is controlled with the BlockQuoteKind definition. When BlockQuoteKind
is None the block quote should be interpreted as a regular block quote:
"> Block quote".
CodeBlock
A fenced code block, optionally with a language identifier.
List
A block for list items.
The list variant is controlled with the ListKind definition.
Item
A list item node that represents different list item variants including task items.
The variant is controlled with the ItemKind definition. When ItemKind is None
the item should be interpreted as unordered list item: "- Item".
TaskListItem
Trait Implementations§
Source§impl Clone for MarkdownNode
impl Clone for MarkdownNode
Source§fn clone(&self) -> MarkdownNode
fn clone(&self) -> MarkdownNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MarkdownNode
impl Debug for MarkdownNode
Source§impl PartialEq for MarkdownNode
impl PartialEq for MarkdownNode
impl StructuralPartialEq for MarkdownNode
Auto Trait Implementations§
impl Freeze for MarkdownNode
impl RefUnwindSafe for MarkdownNode
impl Send for MarkdownNode
impl Sync for MarkdownNode
impl Unpin for MarkdownNode
impl UnwindSafe for MarkdownNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more