mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
Guide: tweak to database integration.
This commit is contained in:
parent
3a80cb7bf3
commit
94b41fd484
@ -34,7 +34,7 @@ impl Message for CreateUser {
|
||||
}
|
||||
```
|
||||
|
||||
We can send a `CreateUser` message to the `DbExecutor` actor, and as a result, we receive a
|
||||
We can send a `CreateUser` message to the `DbExecutor` actor, and as a result, we will receive a
|
||||
`User` model instance. Next, we must define the handler implementation for this message.
|
||||
|
||||
```rust,ignore
|
||||
@ -98,8 +98,8 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
Finally, we use the address in a request handler. We receive the message response
|
||||
asynchronously, thus the handler returns a future object.
|
||||
We will use the address in a request handler. The handle returns a future object;
|
||||
thus, we receive the message response asynchronously.
|
||||
`Route::a()` must be used for async handler registration.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user