Trait RenderInto

Source
pub trait RenderInto {
    // Provided methods
    fn render_fmt(&self, output: impl Write) -> Result { ... }
    fn render_io(&self, output: impl Write) -> Result { ... }
    fn render_string(&self) -> Result<String, Error> { ... }
    fn render_bytes(&self) -> Result<Vec<u8>, Error> { ... }
}
Expand description

Optimized trait methods to render a NaTE template

Every NaTE template implements this trait.

Provided Methods§

Source

fn render_fmt(&self, output: impl Write) -> Result

Render the output into an fmt::Write object

Source

fn render_io(&self, output: impl Write) -> Result

Available on crate features alloc or std only.

Render the output into an io::Write object

Source

fn render_string(&self) -> Result<String, Error>

Available on crate features alloc or std only.

Render the output into a new string

Source

fn render_bytes(&self) -> Result<Vec<u8>, Error>

Available on crate features alloc or std only.

Render the output into a new vector

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§