Trait liquid_core::Runtime[][src]

pub trait Runtime {
    fn partials(&self) -> &dyn PartialStore;
fn name(&self) -> Option<KStringRef<'_>>;
fn roots(&self) -> BTreeSet<KStringCow<'_>>;
fn try_get(&self, path: &[ScalarCow<'_>]) -> Option<ValueCow<'_>>;
fn get(&self, path: &[ScalarCow<'_>]) -> Result<ValueCow<'_>>;
fn set_global(&self, name: KString, val: Value) -> Option<Value>;
fn set_index(&self, name: KString, val: Value) -> Option<Value>;
fn get_index<'a>(&'a self, name: &str) -> Option<ValueCow<'a>>;
fn registers(&self) -> &Registers; }

State for rendering a template

Required methods

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

Partial templates for inclusion.

fn name(&self) -> Option<KStringRef<'_>>[src]

The name of the currently active template.

fn roots(&self) -> BTreeSet<KStringCow<'_>>[src]

All available values

fn try_get(&self, path: &[ScalarCow<'_>]) -> Option<ValueCow<'_>>[src]

Recursively index into the stack.

fn get(&self, path: &[ScalarCow<'_>]) -> Result<ValueCow<'_>>[src]

Recursively index into the stack.

fn set_global(&self, name: KString, val: Value) -> Option<Value>[src]

Sets a value in the global runtime.

fn set_index(&self, name: KString, val: Value) -> Option<Value>[src]

Used by increment and decrement tags

fn get_index<'a>(&'a self, name: &str) -> Option<ValueCow<'a>>[src]

Used by increment and decrement tags

fn registers(&self) -> &Registers[src]

Unnamed state for plugins during rendering

Loading content...

Implementations on Foreign Types

impl<'r, R: Runtime + ?Sized> Runtime for &'r R[src]

Loading content...

Implementors

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

impl<P: Runtime, O: ObjectView> Runtime for StackFrame<P, O>[src]

Loading content...