Mendes is a Rust web toolkit for impatient perfectionists (apologies to Django). It aims to be:
Mendes is currently in an extremely early phase and probably not ready for anything but experiments for those who are curious. Feedback is always welcome though!
This should definitely become more minimal over time.
```rust use asynctrait::asynctrait; use hyper::Body; use mendes::application::IntoResponse; use mendes::http::request::Parts; use mendes::http::{Response, StatusCode}; use mendes::{handler, route, Application, Context};
async fn hello(_: &App) -> Result
struct App {}
impl Application for App { type RequestBody = (); type ResponseBody = Body; type Error = Error;
async fn handle(mut cx: Context<Self>) -> Response<Body> {
route!(match cx.path() {
_ => hello,
})
}
}
enum Error { Mendes(mendes::Error), }
impl From
impl From<&Error> for StatusCode { fn from(e: &Error) -> StatusCode { let Error::Mendes(e) = e; StatusCode::from(e) } }
impl IntoResponse
All feedback welcome. Feel free to file bugs, requests for documentation and any other feedback to the issue tracker.
Mendes was created and is maintained by Dirkjan Ochtman.