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§
Sourcefn render_fmt(&self, output: impl Write) -> Result
fn render_fmt(&self, output: impl Write) -> Result
Render the output into an fmt::Write object
Sourcefn render_io(&self, output: impl Write) -> Result
Available on crate features alloc
or std
only.
fn render_io(&self, output: impl Write) -> Result
alloc
or std
only.Render the output into an io::Write object
Sourcefn render_string(&self) -> Result<String, Error>
Available on crate features alloc
or std
only.
fn render_string(&self) -> Result<String, Error>
alloc
or std
only.Render the output into a new string
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.