[−][src]Struct handlebars::RenderContext
The context of a render call
this context stores information of a render and a writer where generated content is written to.
Implementations
impl<'reg> RenderContext<'reg>
[src]
pub fn new(root_template: Option<&'reg String>) -> RenderContext<'reg>
[src]
Create a render context from a Write
pub fn derive(&self) -> RenderContext<'reg>
[src]
pub fn new_for_block(&self) -> RenderContext<'reg>
[src]
pub fn context(&self) -> Option<Rc<Context>>
[src]
pub fn set_context(&mut self, ctx: Context)
[src]
pub fn evaluate<'ctx>(
&self,
context: &'ctx Context,
path: &str,
strict: bool
) -> Result<&'ctx Json, RenderError>
[src]
&self,
context: &'ctx Context,
path: &str,
strict: bool
) -> Result<&'ctx Json, RenderError>
pub fn evaluate_absolute<'ctx>(
&self,
context: &'ctx Context,
path: &str,
strict: bool
) -> Result<&'ctx Json, RenderError>
[src]
&self,
context: &'ctx Context,
path: &str,
strict: bool
) -> Result<&'ctx Json, RenderError>
pub fn get_partial(&self, name: &str) -> Option<&&Template>
[src]
pub fn set_partial(&mut self, name: String, result: &'reg Template)
[src]
pub fn set_local_var(&mut self, name: String, value: Json)
[src]
pub fn clear_local_vars(&mut self)
[src]
pub fn promote_local_vars(&mut self)
[src]
pub fn demote_local_vars(&mut self)
[src]
pub fn get_local_var(&self, name: &str) -> Option<&Json>
[src]
pub fn is_current_template(&self, p: &str) -> bool
[src]
pub fn register_local_helper(
&mut self,
name: &str,
def: Box<dyn HelperDef + 'static>
) -> Option<Rc<Box<dyn HelperDef + 'static>>>
[src]
&mut self,
name: &str,
def: Box<dyn HelperDef + 'static>
) -> Option<Rc<Box<dyn HelperDef + 'static>>>
pub fn unregister_local_helper(&mut self, name: &str)
[src]
pub fn get_local_helper(
&self,
name: &str
) -> Option<Rc<Box<dyn HelperDef + 'static>>>
[src]
&self,
name: &str
) -> Option<Rc<Box<dyn HelperDef + 'static>>>
pub fn get_current_template_name(&self) -> Option<&'reg String>
[src]
pub fn set_current_template_name(&mut self, name: Option<&'reg String>)
[src]
pub fn get_root_template_name(&self) -> Option<&'reg String>
[src]
pub fn set_root_template_name(&mut self, name: Option<&'reg String>)
[src]
pub fn is_disable_escape(&self) -> bool
[src]
pub fn set_disable_escape(&mut self, disable: bool)
[src]
pub fn get_path(&self) -> &String
[src]
pub fn set_path(&mut self, path: String)
[src]
pub fn get_local_path_root(&self) -> &VecDeque<String>
[src]
pub fn push_local_path_root(&mut self, path: String)
[src]
pub fn pop_local_path_root(&mut self)
[src]
pub fn push_block_context<T>(&mut self, ctx: &T) -> Result<(), RenderError> where
T: Serialize,
[src]
T: Serialize,
pub fn pop_block_context(&mut self)
[src]
pub fn evaluate_in_block_context(
&self,
local_path: &str
) -> Result<Option<&Json>, RenderError>
[src]
&self,
local_path: &str
) -> Result<Option<&Json>, RenderError>
Trait Implementations
impl<'reg> Clone for RenderContext<'reg>
[src]
fn clone(&self) -> RenderContext<'reg>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'reg> Debug for RenderContext<'reg>
[src]
Auto Trait Implementations
impl<'reg> !RefUnwindSafe for RenderContext<'reg>
impl<'reg> !Send for RenderContext<'reg>
impl<'reg> !Sync for RenderContext<'reg>
impl<'reg> Unpin for RenderContext<'reg>
impl<'reg> !UnwindSafe for RenderContext<'reg>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,