[][src]Struct replacer::TemplateBuilder

pub struct TemplateBuilder { /* fields omitted */ }

Builder for the Template struct.

Methods

impl TemplateBuilder[src]

pub fn new() -> Self[src]

Start building a new Template struct.

pub fn rule<R>(self, rule: R) -> Self where
    R: Rule + 'static, 
[src]

Add a new rule that can be applied in batch.

A rule is defined by anything that implements the rule::Rule trait.

let template = TemplateBuilder::new()
    .rule(StringRule::new("replace", "world")?)
    .build();

pub fn build(self) -> Template[src]

Create the Template struct.

Trait Implementations

impl Default for TemplateBuilder[src]

Auto Trait Implementations

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 = Infallible

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.