[][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<Self>[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>>
[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> Unpin for Tag<'a>

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

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

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

Blanket Implementations

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Any for T where
    T: Any