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
sourceimpl<'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
sourceimpl<'reg> Clone for BlockParams<'reg>
impl<'reg> Clone for BlockParams<'reg>
sourcefn clone(&self) -> BlockParams<'reg>
fn clone(&self) -> BlockParams<'reg>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'reg> Debug for BlockParams<'reg>
impl<'reg> Debug for BlockParams<'reg>
sourceimpl<'reg> Default for BlockParams<'reg>
impl<'reg> Default for BlockParams<'reg>
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more