5 unstable releases

0.3.2 Jan 19, 2024
0.3.1 Jan 2, 2024
0.3.0 Mar 7, 2022
0.2.0 Aug 27, 2021
0.1.0 Jun 7, 2021

#2 in #assigns

Download history 5/week @ 2023-11-03 7/week @ 2023-11-10 5/week @ 2023-11-17 10/week @ 2023-11-24 10/week @ 2023-12-01 4/week @ 2023-12-08 7/week @ 2023-12-15 9/week @ 2023-12-22 54/week @ 2023-12-29 9/week @ 2024-01-05 6/week @ 2024-01-12 40/week @ 2024-01-19 11/week @ 2024-01-26 6/week @ 2024-02-02 9/week @ 2024-02-09 77/week @ 2024-02-16

103 downloads per month

MIT/Apache

69KB
952 lines

Welcome to Trillium!

📖 Guide 📖

The guide provides an architectural overview and lay of the land connecting the trillium crates.

📑 Rustdocs 📑

The rustdocs represent the best way to learn about any of trillium's individual crates and the specific interfaces.




Legal:

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

this crate provides the tera templating language for trillium

See the tera site for more information on the tera template language.

use trillium::Conn;
use trillium_tera::{TeraHandler, Tera, TeraConnExt};

let mut tera = Tera::default();
tera.add_raw_template("hello.html", "hello {{name}} from {{render_engine}}")?;

let handler = (
TeraHandler::new(tera),
|conn: Conn| async move { conn.assign("render_engine", "tera") },
|conn: Conn| async move {
conn.assign("name", "trillium").render("hello.html")
}
);

use trillium_testing::prelude::*;
assert_ok!(
get("/").on(&handler),
"hello trillium from tera",
"content-type" => "text/html"
);

Dependencies

~15MB
~335K SLoC