Struct handlebars::BlockParams
source · pub struct BlockParams<'reg> { /* private fields */ }
Expand description
A map holds block parameters. The parameter can be either a value or a reference
Implementations§
source§impl<'reg> BlockParams<'reg>
impl<'reg> BlockParams<'reg>
sourcepub fn new() -> BlockParams<'reg>
pub fn new() -> BlockParams<'reg>
Create a empty block parameter map.
sourcepub fn add_path(
&mut self,
k: &'reg str,
path: Vec<String>
) -> Result<(), RenderError>
pub fn add_path(
&mut self,
k: &'reg str,
path: Vec<String>
) -> Result<(), RenderError>
Add a path reference as the parameter. The path
is a vector of path
segments the relative to current block’s base path.
Trait Implementations§
source§impl<'reg> Clone for BlockParams<'reg>
impl<'reg> Clone for BlockParams<'reg>
source§fn clone(&self) -> BlockParams<'reg>
fn clone(&self) -> BlockParams<'reg>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'reg> Debug for BlockParams<'reg>
impl<'reg> Debug for BlockParams<'reg>
source§impl<'reg> Default for BlockParams<'reg>
impl<'reg> Default for BlockParams<'reg>
source§fn default() -> BlockParams<'reg>
fn default() -> BlockParams<'reg>
Returns the “default value” for a type. Read more