[][src]Struct liquid::compiler::Tag

pub struct Tag<'a> { /* fields omitted */ }

An element that is a tag.

Methods

impl<'a> Tag<'a>
[src]

pub fn new(text: &'a str) -> Result<Tag<'a>, Error>
[src]

Creates a new tag from a string such as "{% tagname tagtoken1 tagtoken2 ... %}".

This is used as a debug tool. It allows to easily build tags in unit tests.

pub fn name(&self) -> &str
[src]

Returns the name of this tag.

Important traits for TagTokenIter<'a>
pub fn tokens(&mut self) -> &mut TagTokenIter<'a>
[src]

Returns the tokens of this tag.

Important traits for TagTokenIter<'a>
pub fn into_tokens(self) -> TagTokenIter<'a>
[src]

Consumes this structure to obtain ownership over its tokens.

pub fn as_str(&self) -> &str
[src]

Returns the tag as a str.

pub fn parse(
    self,
    tag_block: &mut TagBlock,
    options: &Language
) -> Result<Box<dyn Renderable + 'static>, Error>
[src]

Parses the tag just as if it weren't inside any block.

Trait Implementations

impl<'a> From<Pair<'a, Rule>> for Tag<'a>
[src]

Auto Trait Implementations

impl<'a> !Send for Tag<'a>

impl<'a> !Sync for Tag<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: Any