pub struct BlockContext<'reg> { /* private fields */ }
Expand description

A data structure holds contextual data for current block scope.

Implementations

create a new BlockContext with default data

set a local variable into current scope

get a local variable from current scope

borrow a reference to current scope’s base path all paths inside this block will be relative to this path

borrow a mutable reference to the base path

borrow the base value

set the base value

Get a block parameter from this block. Block parameters needed to be supported by the block helper. The typical syntax for block parameter is:

{{#myblock param1 as |block_param1|}}
   ...
{{/myblock}}

Set a block parameter into this block.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.