[−][src]Struct liquid_interpreter::Context
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]
'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: Into<String>, FnT>(
&mut self,
name: S,
f: FnT
) -> RvalT where
FnT: FnOnce(&mut Context) -> RvalT,
[src]
&mut self,
name: S,
f: FnT
) -> RvalT where
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.
Trait Implementations
Auto Trait Implementations
impl<'g> !Send for Context<'g>
impl<'g> Unpin for Context<'g>
impl<'g> !Sync for Context<'g>
impl<'g> !UnwindSafe for Context<'g>
impl<'g> !RefUnwindSafe for Context<'g>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,