[][src]Struct liquid_interpreter::Runtime

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

Processing runtime for a template.

Methods

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

pub fn new() -> Self[src]

Create a default Runtime.

See RuntimeBuilder 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 Runtime) -> 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<KString>, FnT>(
    &mut self,
    name: S,
    f: FnT
) -> RvalT where
    FnT: FnOnce(&mut Runtime) -> 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 Runtime<'g>[src]

Auto Trait Implementations

impl<'g> !RefUnwindSafe for Runtime<'g>

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

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

impl<'g> Unpin for Runtime<'g>

impl<'g> !UnwindSafe for Runtime<'g>

Blanket Implementations

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

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.