Struct minimad::TextTemplate [−][src]
pub struct TextTemplate<'s> { pub text: Text<'s>, // some fields omitted }
Expand description
a markdown template allowing you to replace some placeholders with given values, or to expand some sub-templates with repetitions (useful with lists, table rows, etc.)
Fields
text: Text<'s>
Implementations
impl<'s> TextTemplate<'s>
[src]
impl<'s> TextTemplate<'s>
[src]pub fn expander<'b>(&'b self) -> TextTemplateExpander<'s, 'b>
[src]
pub fn expander<'b>(&'b self) -> TextTemplateExpander<'s, 'b>
[src]return a new expander for the template
Trait Implementations
impl<'s> Debug for TextTemplate<'s>
[src]
impl<'s> Debug for TextTemplate<'s>
[src]impl<'s, 'b> From<&'b TextTemplate<'s>> for TextTemplateExpander<'s, 'b>
[src]
impl<'s, 'b> From<&'b TextTemplate<'s>> for TextTemplateExpander<'s, 'b>
[src]fn from(template: &'b TextTemplate<'s>) -> Self
[src]
fn from(template: &'b TextTemplate<'s>) -> Self
[src]Build a new expander for the template. The expander stores the additions
done with set
, set_md
, set_lines
or in the sub
expanders.
impl<'s> From<&'s str> for TextTemplate<'s>
[src]
impl<'s> From<&'s str> for TextTemplate<'s>
[src]fn from(md: &'s str) -> TextTemplate<'s>
[src]
fn from(md: &'s str) -> TextTemplate<'s>
[src]build a template from a markdown text with placeholders like ${some-name} and sub-templates