Struct bracket::parser::ast::Block[][src]

pub struct Block<'source> { /* fields omitted */ }
Expand description

Block encapsulates an inner template.

These nodes are rendered indirectly via registered helpers that should call back in to the renderer.

When a block has the raw flag set it should only contain a single Text child node.

Implementations

Create a new block.

Get the call for the block.

Set the call for the block.

The name of this block extracted from the call target.

This will only be available if the call target is a path and the path is a simple identifier.

Determine if this block has the raw flag.

Add a condition to this block.

Get the list of conditional blocks.

Add a node to this block; if this block has conditionals then the node is added to the last conditional.

The collection of nodes for this block.

For raw blocks this should always be a single Text node.

The trim hint for the close tag.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Get the string for the open tag.

Get the string for the close tag. Read more

Get the span for the open tag.

Get the span for the close tag.

Determine if this element has been closed.

Mark this element as correctly terminated.

The full byte range for this element; if the element is not closed only the open span is returned. Read more

Reference to the line range for the node.

Mutable reference to the line range for the node.

Set the end of the lines range.

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

This method tests for !=.

String slice of the full span for this node.

The underlying template source.

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.

Converts the given value to a String. 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.