[][src]Struct liquid_interpreter::Context

pub struct Context<'g> { /* fields omitted */ }

Processing context for a template.

Methods

impl<'g> Context<'g>
[src]

pub fn new() -> Self
[src]

Create a default Context.

See ContextBuilder for more control.

pub fn interrupt(&self) -> &InterruptState
[src]

Access the block's InterruptState.

pub fn interrupt_mut(&mut self) -> &mut InterruptState
[src]

Access the block's InterruptState.

pub fn partials(&self) -> &dyn PartialStore
[src]

Partial templates for inclusion.

pub fn get_register_mut<T: IntoBox<dyn Any> + Default>(&mut self) -> &mut T
[src]

Data store for stateful tags/blocks.

If a plugin needs state, it creates a struct State : Default and accesses it via get_register_mut.

pub fn stack(&self) -> &Stack
[src]

Access the current Stack.

pub fn stack_mut<'a>(&'a mut self) -> &'a mut Stack<'g> where
    'g: 'a, 
[src]

Access the current Stack.

pub fn run_in_scope<RvalT, FnT>(&mut self, f: FnT) -> RvalT where
    FnT: FnOnce(&mut Context) -> RvalT, 
[src]

Sets up a new stack frame, executes the supplied function and then tears the stack frame down before returning the function's result to the caller.

pub fn run_in_named_scope<RvalT, S: Into<String>, FnT>(
    &mut self,
    name: S,
    f: FnT
) -> RvalT where
    FnT: FnOnce(&mut Context) -> RvalT, 
[src]

Sets up a new stack frame, executes the supplied function and then tears the stack frame down before returning the function's result to the caller.

Trait Implementations

impl<'g> Default for Context<'g>
[src]

Auto Trait Implementations

impl<'g> !Send for Context<'g>

impl<'g> !Sync for Context<'g>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]