Struct rocket_dyn_templates::handlebars::BlockContext [−][src]
pub struct BlockContext<'reg> { /* fields omitted */ }
Expand description
A data structure holds contextual data for current block scope.
Implementations
create a new BlockContext
with default data
set a local variable into current scope
get a local variable from current scope
borrow a reference to current scope’s base path all paths inside this block will be relative to this path
borrow a mutable reference to the base path
borrow the base value
set the base value
Get a block parameter from this block. Block parameters needed to be supported by the block helper. The typical syntax for block parameter is:
{{#myblock param1 as |block_param1|}}
...
{{/myblock}}
Set a block parameter into this block.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<'reg> RefUnwindSafe for BlockContext<'reg>
impl<'reg> Send for BlockContext<'reg>
impl<'reg> Sync for BlockContext<'reg>
impl<'reg> Unpin for BlockContext<'reg>
impl<'reg> UnwindSafe for BlockContext<'reg>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
pub fn vzip(self) -> V