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

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§

source

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

source

fn reflection(&self) -> &dyn TagReflection

Trait Implementations§

source§

impl Clone for Box<dyn ParseTag>

source§

fn clone(&self) -> Box<dyn ParseTag>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T> From<T> for Box<dyn ParseTag>where T: 'static + ParseTag,

source§

fn from(filter: T) -> Self

Converts to this type from the input type.

Implementors§