Enum comrak::nodes::NodeValue [] [src]

pub enum NodeValue {
    Document,
    BlockQuote,
    List(NodeList),
    Item(NodeList),
    CodeBlock(NodeCodeBlock),
    HtmlBlock(NodeHtmlBlock),
    Paragraph,
    Heading(NodeHeading),
    ThematicBreak,
    Table(Vec<TableAlignment>),
    TableRow(bool),
    TableCell,
    Text(String),
    SoftBreak,
    LineBreak,
    Code(String),
    HtmlInline(String),
    Emph,
    Strong,
    Strikethrough,
    Superscript,
    Link(NodeLink),
    Image(NodeLink),
}

The core AST node enum.

Variants

The root of every CommonMark document. Contains blocks.

Block. A block quote. Contains other blocks.

> A block quote.

Block. A list. Contains list items.

* An unordered list
* Another item

1. An ordered list
2. Another item

Block. A list item. Contains other blocks.

Block. A code block; may be fenced or indented. Contains raw text which is not parsed as Markdown, although is HTML escaped.

Block. A HTML block. Contains raw text which is neither parsed as Markdown nor HTML escaped.

Block. A paragraph. Contains inlines.

Block. A heading; may be an ATX heading or a setext heading. Contains inlines.

Block. A thematic break. Has no children.

Block. A table per the GFM spec. Contains table rows.

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.

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.

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.

Inline. A link to some URL, with possible title.

Inline. An image.

Methods

impl NodeValue
[src]

Indicates whether this node is a block node or inline node.

Indicates whether this node may contain inlines.

Return a reference to the text of a Text inline, if this node is one.

Convenience method.

Return a mutable reference to the text of a Text inline, if this node is one.

Convenience method.

Trait Implementations

impl Debug for NodeValue
[src]

Formats the value using the given formatter.

impl Clone for NodeValue
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more