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 | 0f16e32d934a3c83efa82ab3c205dcdbd3397645 (patch) | |
| tree | 69c782dcbcff708fad7c45d937809d9c152c5dde /examples | |
| parent | refactor(router): no need for pin (diff) | |
| download | windmark-0f16e32d934a3c83efa82ab3c205dcdbd3397645.tar.xz windmark-0f16e32d934a3c83efa82ab3c205dcdbd3397645.zip | |
feat(macros): async response macros
Diffstat (limited to 'examples')
| -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 } |