-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.await version of the simple_async_handlers example
- Loading branch information
Showing
7 changed files
with
116 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ description = "An example that does asynchronous work before responding" | |
version = "0.0.0" | ||
authors = ["David Laban <[email protected]>"] | ||
publish = false | ||
edition = "2018" | ||
|
||
[dependencies] | ||
gotham = { path = "../../../gotham" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
[package] | ||
name = "gotham_examples_handlers_simple_async_handlers" | ||
name = "gotham_examples_handlers_simple_async_handlers_await" | ||
description = "An example that does asynchronous work before responding" | ||
version = "0.0.0" | ||
authors = ["David Laban <[email protected]>"] | ||
publish = false | ||
edition = "2018" | ||
|
||
[dependencies] | ||
gotham = { path = "../../../gotham" } | ||
gotham_derive = { path = "../../../gotham_derive" } | ||
|
||
hyper = "0.12" | ||
mime = "0.3" | ||
futures = "0.1" | ||
# We need two versions of the futures library. One that matches what Gotham | ||
# understands, and one that matches what .await understands. Stolen from: | ||
# https://rust-lang-nursery.github.io/futures-rs/blog/2019/04/18/compatibility-layer.html | ||
# (although they call the old version futures01 and we call it legacy_futures) | ||
legacy_futures = {package = "futures", version = "0.1"} | ||
futures = {package = "futures", version = "0.3.1", features = ["compat"]} | ||
serde = "1.0" | ||
serde_derive = "1.0" | ||
tokio = "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters