diff --git a/layouts/index.html b/layouts/index.html index faf9ca9..b47a215 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -59,6 +59,76 @@ fn main() { +
+ Handler functions in actix can return a wide range of objects that
+ implement the Responder
trait. This makes it a breeze
+ to return consistent responses from your APIs.
+
+ Actix comes with a powerful extractor system that extracts data + from the incoming HTTP request and passes it to your view functions. + Not only does this make for a convenient API but it also means that + your view functions can be synchronous code and still benefit + from asynchronous IO handling. +
+ {{ highlight `#[derive(Deserialize)] +struct Event { + timestamp: f64, + kind: String, + tags: Vec+ Handling multipart/urlencoded form data is easy. Just define + a structure that can be deserialized and actix will handle + the rest. +
+ {{ highlight `#[derive(Deserialize)] +struct Register { + username: String, + country: String, +} + +fn register(data: Form