Enum comrak::nodes::NodeValue [−][src]
pub enum NodeValue {}Show variants
Document, FrontMatter(Vec<u8>), BlockQuote, List(NodeList), Item(NodeList), DescriptionList, DescriptionItem(NodeDescriptionItem), DescriptionTerm, DescriptionDetails, CodeBlock(NodeCodeBlock), HtmlBlock(NodeHtmlBlock), Paragraph, Heading(NodeHeading), ThematicBreak, FootnoteDefinition(Vec<u8>), Table(Vec<TableAlignment>), TableRow(bool), TableCell, Text(Vec<u8>), TaskItem(bool), SoftBreak, LineBreak, Code(NodeCode), HtmlInline(Vec<u8>), Emph, Strong, Strikethrough, Superscript, Link(NodeLink), Image(NodeLink), FootnoteReference(Vec<u8>),
Expand description
The core AST node enum.
Variants
The root of every CommonMark document. Contains blocks.
Non-Markdown front matter. Treated as an opaque blob.
Block. A block quote. Contains other blocks.
> A block quote.
List(NodeList)
Block. A list. Contains list items.
* An unordered list * Another item 1. An ordered list 2. Another item
Item(NodeList)
Block. A list item. Contains other blocks.
Block. A description list, enabled with ext_description_lists
option. Contains
description items.
It is required to put a blank line between terms and details.
Term 1 : Details 1 Term 2 : Details 2
DescriptionItem(NodeDescriptionItem)
Block*. An item of a description list. Contains a term and one details block.
Block. Term of an item in a definition list.
Block. Details of an item in a definition list.
CodeBlock(NodeCodeBlock)
Block. A code block; may be fenced or indented. Contains raw text which is not parsed as Markdown, although is HTML escaped.
HtmlBlock(NodeHtmlBlock)
Block. A HTML block. Contains raw text which is neither parsed as Markdown nor HTML escaped.
Block. A paragraph. Contains inlines.
Heading(NodeHeading)
Block. A heading; may be an ATX heading or a setext heading. Contains inlines.
Block. A thematic break. Has no children.
Block. A footnote definition. The Vec<u8>
is the footnote’s name.
Contains other blocks.
Table(Vec<TableAlignment>)
Block. A table per the GFM spec. Contains table rows.
TableRow(bool)
Block. A table row. The bool
represents whether the row is the header row or not.
Contains table cells.
Block. A table cell. Contains inlines.
Inline. Textual content. All text
in a document will be contained in a Text
node.
TaskItem(bool)
Inline. Task list item. The
bool
indicates whether it is checked or not.
Inline. A soft line break. If
the hardbreaks
option is set in ComrakOptions
during formatting, it will be formatted
as a LineBreak
.
Inline. A hard line break.
Code(NodeCode)
Inline. A code span.
Inline. Raw HTML contained inline.
Inline. Emphasised text.
Inline. Strong text.
Inline. Strikethrough text per the GFM spec.
Inline. Superscript. Enabled with ext_superscript
option.
Link(NodeLink)
Inline. A link to some URL, with possible title.
Image(NodeLink)
Inline. An image.
Inline. A footnote reference; the Vec<u8>
is the referent footnote’s name.
Implementations
Whether the type the node is of can contain inline nodes.
Return a reference to the text of a Text
inline, if this node is one.
Convenience method.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NodeValue
impl UnwindSafe for NodeValue
Blanket Implementations
Mutably borrows from an owned value. Read more