Enum crowbook::Token [] [src]

pub enum Token {
    Str(String),
    Paragraph(Vec<Token>),
    Header(i32Vec<Token>),
    Emphasis(Vec<Token>),
    Strong(Vec<Token>),
    Code(Vec<Token>),
    BlockQuote(Vec<Token>),
    CodeBlock(StringVec<Token>),
    List(Vec<Token>),
    OrderedList(usizeVec<Token>),
    Item(Vec<Token>),
    Table(i32Vec<Token>),
    TableHead(Vec<Token>),
    TableRow(Vec<Token>),
    TableCell(Vec<Token>),
    Footnote(Vec<Token>),
    Rule,
    SoftBreak,
    HardBreak,
    Link(StringStringVec<Token>),
    Image(StringStringVec<Token>),
    StandaloneImage(StringStringVec<Token>),
}

A single token representing a Markdown element.

A Markdown document is, thus, a Vec of Tokens.

Variants

The most simple element, containing a String

A paragraph, containing a list of elements

A header with a header number and the title

Emphasis, a.k.a. italics

Strong, a.k.a. bold

Code, a.k.a. verbatim

A quote

Code block with language and content

Unordered list, with a vector of Items

Ordered list, with a starting number, and a list of Items

Item of a list

Table with number of rows, and a list of TableHead and TableRows

Table header, contains TableCells

Row of a table, contains TableCells

Cell of a table

A footnote, contains the content it is pointing to.

Horizontal rule

Softbreak, usually rendered by a space

Hardbreak

A link with an url, a title, and the linked text

An image with a source url, a title and an alt tex

Similar to previous, but when image is in a standalone paragraph

Methods

impl Token
[src]

Returns the inner list of tokens contained in this token (if any)

Returns the inner list of tokens contained in this token (if any) (mutable version)

Checks whether token is an image

Returns true if and only if token is Image variant (StandaloneImage returns false, like other variants)

Trait Implementations

impl Debug for Token
[src]

Formats the value using the given formatter.

impl PartialEq for Token
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Token
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more