logo
pub struct State<'vm, 'env> { /* private fields */ }
Expand description

Provides access to the current execution state of the engine.

A read only reference is passed to filter functions and similar objects to allow limited interfacing with the engine. The state is useful to look up information about the engine in filter, test or global functions. It not only provides access to the template environment but also the context variables of the engine, the current auto escaping behavior as well as the auto escape flag.

Implementations

Returns a reference to the current environment.

Returns the name of the current template.

Returns the current value of the auto escape flag.

Returns the name of the innermost block.

Looks up a variable by name in the context.

Trait Implementations

Formats the value using the given formatter. 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

Performs the conversion.

Performs the conversion.

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.