pub struct BindNode { /* private fields */ }Expand description
Binds the output of a child node into the render context without emitting it.
This is the node generated for {% alias:rule %} statements. If alias is
not already bound, it renders rule and stores the result under alias. It
also supports {% alias:=rule %} statements, which always render rule and
overwrite alias. Binding statements always return an empty string so later
{alias} references reuse the generated value.
Implementations§
Trait Implementations§
Source§impl TextGeneratorNode for BindNode
impl TextGeneratorNode for BindNode
Source§fn generate_text(
&self,
state: &mut RenderState<'_>,
) -> Result<String, RenderError>
fn generate_text( &self, state: &mut RenderState<'_>, ) -> Result<String, RenderError>
Generates text using the supplied render state.
Source§fn generate_unique_text(
&self,
rule_name: &str,
_state: &mut RenderState<'_>,
) -> Result<String, RenderError>
fn generate_unique_text( &self, rule_name: &str, _state: &mut RenderState<'_>, ) -> Result<String, RenderError>
Generates text for a strict unique call to
rule_name.Auto Trait Implementations§
impl !RefUnwindSafe for BindNode
impl !Send for BindNode
impl !Sync for BindNode
impl !UnwindSafe for BindNode
impl Freeze for BindNode
impl Unpin for BindNode
impl UnsafeUnpin for BindNode
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