[][src]Struct minimad::TextTemplate

pub struct TextTemplate<'s> { /* fields omitted */ }

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.)

Methods

impl<'s> TextTemplate<'s>[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, 'b> From<&'b TextTemplate<'s>> for TextTemplateExpander<'s, 'b>[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]

fn from(md: &'s str) -> TextTemplate<'s>[src]

build a template from a markdown text with placeholders like ${some-name} and sub-templates

Auto Trait Implementations

impl<'s> RefUnwindSafe for TextTemplate<'s>

impl<'s> Send for TextTemplate<'s>

impl<'s> Sync for TextTemplate<'s>

impl<'s> Unpin for TextTemplate<'s>

impl<'s> UnwindSafe for TextTemplate<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.