1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 23:56:35 +00:00

fix guide

This commit is contained in:
Nikolay Kim 2018-03-06 00:44:45 -08:00
parent d573cf2d97
commit 7eb310f8ce

View file

@ -24,11 +24,13 @@ impl Actor for DbExecutor {
This is definition of our actor. Now we need to define *create user* message and response.
```rust,ignore
#[derive(Message)]
#[rtype(User, Error)]
struct CreateUser {
name: String,
}
impl Message for CreateUser {
type Result = Result<User, Error>;
}
```
We can send `CreateUser` message to `DbExecutor` actor, and as result we get