[−][src]Struct liquid::interpreter::Context
Processing context for a template.
Methods
impl<'g> Context<'g>
[src]
pub fn new() -> Context<'g>
[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>(&mut self) -> &mut T where
T: Default + IntoBox<dyn Any + 'static>,
[src]
T: Default + IntoBox<dyn Any + 'static>,
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]
'g: 'a,
Access the current Stack
.
pub fn run_in_scope<RvalT, FnT>(&mut self, f: FnT) -> RvalT where
FnT: FnOnce(&mut Context) -> RvalT,
[src]
FnT: FnOnce(&mut Context) -> RvalT,
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, FnT>(&mut self, name: S, f: FnT) -> RvalT where
FnT: FnOnce(&mut Context) -> RvalT,
S: Into<String>,
[src]
FnT: FnOnce(&mut Context) -> RvalT,
S: Into<String>,
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
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: Any,
T: Any,