Trait liquid_core::ParseTag[][src]

pub trait ParseTag: Send + Sync + ParseTagClone {
    fn parse(
        &self,
        arguments: TagTokenIter<'_>,
        options: &Language
    ) -> Result<Box<dyn Renderable>>;
fn reflection(&self) -> &dyn TagReflection; }

A trait for creating custom tags. This is a simple type alias for a function.

This function will be called whenever the parser encounters a tag and returns a new Renderable based on its parameters. The received parameters specify the name of the tag, the argument Tokens passed to the tag and the global Language.

Required methods

fn parse(
    &self,
    arguments: TagTokenIter<'_>,
    options: &Language
) -> Result<Box<dyn Renderable>>
[src]

fn reflection(&self) -> &dyn TagReflection[src]

Loading content...

Implementors

Loading content...