[−][src]Trait yarte::Template
Template trait, will implement by derive like Display
or actix_web::Responder
(with feature)
use yarte::Template; #[derive(Template)] #[template(src="Hello, {{ name }}!")] struct HelloTemplate<'a> { name: &'a str, } println!("{}", HelloTemplate { name: "world" })
Required methods
fn mime() -> &'static str where
Self: Sized,
Self: Sized,
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types
fn size_hint() -> usize
Approximation of output size used in method call
.
Yarte implements an heuristic algorithm of allocation.