Trait rocket_dyn_templates::handlebars::Output

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

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

The Output API.

Handlebars uses this trait to define rendered output.

Required Methods§

source

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

Provided Methods§

source

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

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§