SpecialParseContext

Trait SpecialParseContext 

Source
pub trait SpecialParseContext {
    // Required method
    fn before_element_hook(
        &mut self,
        _input: ParseStream<'_>,
    ) -> Result<Option<SpecialInstructions>>;
}

Required Methods§

Source

fn before_element_hook( &mut self, _input: ParseStream<'_>, ) -> Result<Option<SpecialInstructions>>

Handle any special syntax for a special kind of template context.

This method is called only when parsing multi-element Templates, It’s a hook, called before parsing each TemplateElement.

It should consume any special syntax as appropriate,

The default implementation is a no-op. The only non-default implementation is in paste.rs, for $<...> - see paste::AngleBrackets.

Implementations on Foreign Types§

Source§

impl SpecialParseContext for Option<AngleBrackets>

Source§

impl SpecialParseContext for ()

Implementors§