lib_humus/proto_engine.rs
1
2use tera::Tera;
3use toml::Table;
4
5/// A constructable version of [HumusEngine] without the types attached.
6///
7/// Can be converted from and to to a [HumusEngine] when it is enabled
8/// with the `axum-view` flag. Otherwise it acts as a container for
9/// returning values from the [TemplateEngineLoader].
10///
11/// [HumusEngine]: ./struct.HumusEngine.html
12/// [TemplateEngineLoader]: ./struct.TemplateEngineLoader.html
13#[derive(Debug, Clone)]
14pub struct HumusProtoEngine {
15
16 /// An instance of the tera templating engine.
17 pub tera: Tera,
18
19 /// If it was possible to read any extra configuration it will be stored here.
20 pub template_config: Option<Table>,
21}
22