Struct comrak::nodes::NodeCodeBlock[][src]

pub struct NodeCodeBlock {
    pub fenced: bool,
    pub fence_char: u8,
    pub fence_length: usize,
    pub info: Vec<u8>,
    pub literal: Vec<u8>,
    // some fields omitted
}
Expand description

The metadata and data of a code block (fenced or indented).

Fields

fenced: bool

Whether the code block is fenced.

fence_char: u8

For fenced code blocks, the fence character itself (` or ~).

fence_length: usize

For fenced code blocks, the length of the fence.

info: Vec<u8>

For fenced code blocks, the info string after the opening fence, if any.

literal: Vec<u8>

The literal contents of the code block. As the contents are not interpreted as Markdown at all, they are contained within this structure, rather than inserted into a child inline of any kind.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.