pub struct TagBlock<'a: 'b, 'b> { /* private fields */ }
Expand description

An interface to access elements inside a block.

Implementations

Returns the next element of the block, if any, similarly to an iterator.

However, if the input text reaches its end and the block is not closed, an error is returned instead.

Retrieves all the content of this block as a String, regardless of being valid liquid or not.

Do not use this method in a block you already called .next() on.

Set the parameter allow_nesting of this function to true if you still want these tags to nest (so the number of {% name %} must be equal to the number of {% endname %}) of false if you don’t (only the first {% name %} is parsed, a single {% endname %} will always close the tag).

Panics

Will panic if used in a closed block.

A convenient method that parses every element remaining in the block.

Parses the next element in the block just as if it weren’t inside any block.

Returns none if no element is left and raises the same errors as next().

Checks whether the block was fully parsed its elements.

This must be added at the end of every block right before returning, so as to ensure that it doesn’t leave any unparsed element by accident.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.