1 unstable release
0.0.0 | Oct 16, 2019 |
---|
#13 in #gotham
4KB
(WIP) gotham_ext_responses
Implements gotham::handler::IntoResponse
for various types.
Installation
Add gotham_ext_responses as a dependency in Cargo.toml
[dependencies]
gotham_ext_responses = "*"
Usage
use askama::Template;
use gotham_ext_responses::IntoResponseExt;
/// Askama templates are the first type to be implemented
#[derive(Debug, Template)
#[template_name(path = "example.html")]
struct Example<'a {
name: &'a str,
}
fn handler(state: State) -> (State, Example) {
let example = Example { name: "Alice" };
(state, example)
}
Code of Conduct
All interactions with this project fall under its code of conduct. Please see the code of conduct file (code-of-conduct.md
) for details.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
All contributions fall under the project code of conduct.
Please make sure to update tests as appropriate.
License
This project is licensed under either MIT or Apache-2.0
Dependencies
~26MB
~564K SLoC