Crate susanoo [−] [src]
A micro Web framework based on Hyper, Futures and Tokio.
Example
extern crate susanoo; use susanoo::prelude::*; fn hello(ctx: Context) -> Outcome<Response> { ctx.respond("Hello, world") } fn main() { let s = Susanoo::default() .with_route(Route::get("/", hello)); s.run().unwrap() }
Reexports
pub extern crate futures; |
pub extern crate hyper; |
Modules
body | |
header |
Headers container, and common header fields. |
prelude | |
response | |
router |
Macros
try_f |
Structs
Body | |
Context |
A context during handling. |
HandleError |
Error type thrown during handling |
Response |
[unstable] A response which contains all information to construct |
Route |
A route endpoint, which contains the instance of handler and middlewares |
Storage |
A storage of shared, global variables. |
Susanoo |
Root instance of Web application. |
Enums
Outcome |
A future returned from middlewares/handlers. |
StatusCode |
An HTTP status code ( |
Traits
ErrorHandler | |
FromBody | |
FromForm | |
Handler |
Represents a handler |
Responder |
Represents a "responder", which converted to |