Struct handlebars::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
The context wrap data you render on your templates.
Methods
impl Context
[src]
pub fn null() -> Context
[src]
Create a context with null data
pub fn wraps<T: Serialize>(e: &T) -> Result<Context, RenderError>
[src]
Create a context with given data
[src]
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_mut(&mut self) -> &mut Json
[src]
Trait Implementations
impl Debug for Context
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more