Struct handlebars::Context [−][src]
pub struct Context { /* fields omitted */ }
The context wrap data you render on your templates.
Methods
impl Context
[src]
impl Context
pub fn null() -> Context
[src]
pub fn null() -> Context
Create a context with null data
pub fn wraps<T: Serialize>(e: T) -> Result<Context, RenderError>
[src]
pub fn wraps<T: Serialize>(e: T) -> Result<Context, RenderError>
Create a context with given data
Navigate the context with base path and relative path
Typically you will set base path to RenderContext.get_path()
and set relative path to helper argument or so.
If you want to navigate from top level, set the base path to "."
pub fn data(&self) -> &Json
[src]
pub fn data(&self) -> &Json
pub fn data_mut(&mut self) -> &mut Json
[src]
pub fn data_mut(&mut self) -> &mut Json
Trait Implementations
impl Debug for Context
[src]
impl Debug for Context
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Context
[src]
impl Clone for Context