[][src]Struct ucglib::build::format::SimpleFormatter

pub struct SimpleFormatter<V: Into<String> + Clone> { /* fields omitted */ }

Implements the logic for format strings in UCG format expressions.

Methods

impl<V: Into<String> + Clone> SimpleFormatter<V>[src]

pub fn new<S: Into<String>>(tmpl: S, args: Vec<V>) -> Self[src]

Constructs a Formatter with a template and args.

Trait Implementations

impl<V: Into<String> + Clone> FormatRenderer for SimpleFormatter<V>[src]

fn render(&self, pos: &Position) -> Result<String, Box<dyn Error>>[src]

Renders a formatter to a string or returns an error.

If the formatter has the wrong number of arguments for the number of replacements it will return an error. Otherwise it will return the formatted string.

Auto Trait Implementations

impl<V> Send for SimpleFormatter<V> where
    V: Send

impl<V> Sync for SimpleFormatter<V> where
    V: Sync

Blanket Implementations

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.

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

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

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