1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Explicit returning can improve readability
// Better than uing an Option …
// Don't want to deal with reimplmenting as `Display` right now.
// Those are okay
// Tabs are just fine
//! lib-humus helps with some fertile ground to build project on.
//!
//! It helps combining axum with tera and getting configuration from toml-files.
//!
//! The idea behind this is that all the data that gets rendered as html
//! should also be available as a JSON-API (and other formats if useful).
//! The html should also come from easily replaceable templates
//! that are themselves configurable.
//!
//! The [HumusEngine] helps you with that,
//! it gets handed a serde seralizable [View][HumusView]
//! and some [HumusQuerySettings] and then generates an appropriate response.
//! (How you generate those is currently completely up to you.)
//!
//! Loading the templates and the template configuration
//! can be done using the [TemplateEngineLoader].
//!
//! This library is derived from (and now used by) the
//! [echoip-slatecave service](https://codeberg.org/slatian/service.echoip-slatecave).
//!
//! # Feature-flags
//!
//! Features enabled by default:
//! * `axum-view`: Provides the [HumusEngine] and sourrounding utilities
//! * `tera-loader`: Provides the [TemplateEngineLoader].
//!
//! Features disabled by default:
//! * `axum-view+cookie`: Provides the [HumusView::get_cookie_header] helper for setting cookies.
///////////////////////////////////////
// Tera-Loader
pub use *;
///////////////////////////////////////
// Proto Engine
pub use HumusProtoEngine;
///////////////////////////////////////
// Axum-View
pub use ;