handlebars

Trait Output

Source
pub trait Output {
    // Required method
    fn write(&mut self, seg: &str) -> Result<(), IOError>;

    // Provided method
    fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), IOError> { ... }
}
Expand description

The Output API.

Handlebars uses this trait to define rendered output.

Required Methods§

Source

fn write(&mut self, seg: &str) -> Result<(), IOError>

Provided Methods§

Source

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), IOError>

Designed to be used with write! macro. for backward compatibility and to avoid breakage the default implementation uses format! this may be not what you want.

Implementors§