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
Auto Trait Implementations§
impl<'reg> RefUnwindSafe for BlockParams<'reg>
impl<'reg> Send for BlockParams<'reg>
impl<'reg> Sync for BlockParams<'reg>
impl<'reg> Unpin for BlockParams<'reg>
impl<'reg> UnwindSafe for BlockParams<'reg>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more