1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

update readme

This commit is contained in:
Nikolay Kim
2017-12-14 20:12:28 -08:00
parent c37565cc4a
commit a2dff8a0b9
5 changed files with 38 additions and 8 deletions

View File

@@ -41,9 +41,8 @@ fn index(req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>> {
## Response with custom type
To return custom type directly from handler function `FromResponse` trait should be
implemented for this type. Let's create response for custom type that
serializes to `application/json` response:
To return custom type directly from handler function type needs to implement `Responder` trait.
Let's create response for custom type that serializes to `application/json` response:
```rust
# extern crate actix;