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.
impl<'source> Block<'source>
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.
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 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.
impl<'source> Eq for Block<'source>
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.