aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-06 05:54:22 +0000
committerFuwn <[email protected]>2023-04-06 05:54:22 +0000
commit0f16e32d934a3c83efa82ab3c205dcdbd3397645 (patch)
tree69c782dcbcff708fad7c45d937809d9c152c5dde /examples
parentrefactor(router): no need for pin (diff)
downloadwindmark-0f16e32d934a3c83efa82ab3c205dcdbd3397645.tar.xz
windmark-0f16e32d934a3c83efa82ab3c205dcdbd3397645.zip
feat(macros): async response macros
Diffstat (limited to 'examples')
-rw-r--r--examples/windmark.rs4
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
}