diff options
| author | Fuwn <[email protected]> | 2023-04-06 05:54:22 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-06 05:54:22 +0000 |
| commit | 37f3b82851ebe1a2bc9caac4c4b0b7369a74ea5f (patch) | |
| tree | 69c782dcbcff708fad7c45d937809d9c152c5dde /examples/windmark.rs | |
| parent | refactor(router): no need for pin (diff) | |
| download | windmark-37f3b82851ebe1a2bc9caac4c4b0b7369a74ea5f.tar.xz windmark-37f3b82851ebe1a2bc9caac4c4b0b7369a74ea5f.zip | |
feat(macros): async response macros
Diffstat (limited to 'examples/windmark.rs')
| -rw-r--r-- | examples/windmark.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/windmark.rs b/examples/windmark.rs index 9e23d6e..7c46d9d 100644 --- a/examples/windmark.rs +++ b/examples/windmark.rs @@ -214,6 +214,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { router.mount("/async-nothing", |_| { async { Response::success("This is an async route.") } }); + router.mount( + "/async-macro", + windmark::success_async!(async { "hi" }.await), + ); router.run().await } |