mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 05:41:50 +01:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
d573cf2d97
@ -12,7 +12,7 @@ We have to define sync actor and connection that this actor will use. Same appro
|
|||||||
could be used for other databases.
|
could be used for other databases.
|
||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
use actix::prelude::*;*
|
use actix::prelude::*;
|
||||||
|
|
||||||
struct DbExecutor(SqliteConnection);
|
struct DbExecutor(SqliteConnection);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ We can send `CreateUser` message to `DbExecutor` actor, and as result we get
|
|||||||
|
|
||||||
```rust,ignore
|
```rust,ignore
|
||||||
impl Handler<CreateUser> for DbExecutor {
|
impl Handler<CreateUser> for DbExecutor {
|
||||||
type Result = Result<User, Error>
|
type Result = Result<User, Error>;
|
||||||
|
|
||||||
fn handle(&mut self, msg: CreateUser, _: &mut Self::Context) -> Self::Result
|
fn handle(&mut self, msg: CreateUser, _: &mut Self::Context) -> Self::Result
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user