5 unstable releases
0.3.2 | Jan 19, 2024 |
---|---|
0.3.1 | Jan 2, 2024 |
0.3.0 | Dec 22, 2021 |
0.2.0 | Aug 27, 2021 |
0.1.0 | Jun 7, 2021 |
#29 in #trillium
63KB
888 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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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
:
provides support for using the askama compile-time template library with trillium. see https://github.com/djc/askama for more information about using askama.
use trillium::Conn;
use trillium_askama::{AskamaConnExt, Template};
#[derive(Template)]
#[template(path = "examples/hello.html")]
struct HelloTemplate<'a> {
name: &'a str,
}
async fn handler(conn: Conn) -> Conn {
conn.render(HelloTemplate { name: "trillium" })
}
use trillium_testing::prelude::*;
assert_ok!(
get("/").on(&handler),
"Hello, trillium!",
"content-type" => "text/html"
);
Dependencies
~8.5MB
~211K SLoC