From 80acbb0de77fc7da0155e60406cf294ec1255ab8 Mon Sep 17 00:00:00 2001 From: donjuanplatinum <113148619+donjuanplatinum@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:47:31 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0async=E5=92=8Cawait=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/appendix/keywords.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appendix/keywords.md b/src/appendix/keywords.md index 70f33010..d1c815d3 100644 --- a/src/appendix/keywords.md +++ b/src/appendix/keywords.md @@ -7,6 +7,8 @@ 如下关键字目前有对应其描述的功能。 - `as` - 强制类型转换,或`use` 和 `extern crate`包和模块引入语句中的重命名 +- `async` - 返回一个 Future 而不是阻塞当前线程 +- `await` - 暂停执行直到 Future 的结果就绪 - `break` - 立刻退出循环 - `const` - 定义常量或原生常量指针(constant raw pointer) - `continue` - 继续进入下一次循环迭代 @@ -48,8 +50,6 @@ 如下关键字没有任何功能,不过由 Rust 保留以备将来的应用。 - `abstract` -- `async` -- `await` - `become` - `box` - `do`