pub struct TextTemplateExpander<'s, 'b> { /* private fields */ }
Expand description

an expander you get from a template. You specify replacements on the expander then you ask it the text using expand

Implementations

replace placeholders with name name with the given value, non interpreted (i.e. stars, backquotes, etc. don’t mess the styling defined by the template)

replace all placeholders with the given value, non interpreted (i.e. stars, backquotes, etc. don’t mess the styling defined by the template). This can be used at start to have a “default” value.

replace placeholders with name name with the given value, interpreted as markdown

replace a placeholder with several lines. This is mostly useful when the placeholder is a repeatable line (code, list item)

replace a placeholder with several lines interpreted as markdown

prepare expansion of a sub template and return a mutable reference to the object in which to set compound replacements

build a text by applying the replacements to the initial template

Trait Implementations

Build a new expander for the template. The expander stores the additions done with set, set_md, set_lines or in the sub expanders.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.