[][src]Trait bracket::helper::Helper

pub trait Helper: Send + Sync {
    pub fn call<'render, 'call>(
        &self,
        rc: &mut Render<'render>,
        ctx: &Context<'call>,
        template: Option<&'render Node<'render>>
    ) -> HelperValue; }

Trait for helpers.

Required methods

pub fn call<'render, 'call>(
    &self,
    rc: &mut Render<'render>,
    ctx: &Context<'call>,
    template: Option<&'render Node<'render>>
) -> HelperValue
[src]

Function that is called when this helper is resolved by the renderer for a statement or block.

The rc argument is the render context that can be used to render inner templates and write to the destination output.

The ctx argument provides access to the helper arguments and hash parameters. It also provides support for type assertions and some convenience functions for working with the Value type.

The template argument holds the inner template when the helper is invoked as a block.

For raw block helpers use the text() function on ctx to access the underlying string slice.

Loading content...

Implementors

impl Helper for Equal[src]

impl Helper for GreaterThan[src]

impl Helper for GreaterThanEqual[src]

impl Helper for LessThan[src]

impl Helper for LessThanEqual[src]

impl Helper for NotEqual[src]

impl Helper for Each[src]

impl Helper for If[src]

impl Helper for Json[src]

impl Helper for Log[src]

impl Helper for And[src]

impl Helper for Not[src]

impl Helper for Or[src]

impl Helper for Lookup[src]

impl Helper for Unless[src]

impl Helper for With[src]

Loading content...