#future #await #macro

await_macros

将宏展开为 (expr).await

5 个版本

0.2.0 2019 年 5 月 9 日
0.1.3 2019 年 5 月 6 日
0.1.2 2019 年 5 月 6 日
0.1.1 2019 年 5 月 6 日
0.1.0 2019 年 5 月 6 日

#1911 in 异步

MIT/Apache

7KB

await_macros

更新 (2019-05-09): 现在这个crate可以在nightly上展开!确保您至少有2019-05-08的nightly版本才能使用这个crate。在稳定版上它会出错,所以,嗯,现在别在稳定版上尝试使用它 :)

一堆宏,实际上只展开为 (expr).await,作为后缀语法的替代方案。祝您玩得开心!

当前宏名称列表:

avait!(future)

avvait!(future)

back_to_the!(future)

divine!(future)

avast!(future)

anticipate!(future)

hope!(future)

foresee!(future)

envision!(future)

doubt!(future)

predict!(future)

be_afraid!(future)

count_on!(future)

prophesize!(future)

foretell!(future)

wait_up!(future)

hey_give_that_back!(future)

aweight!(future)

hold_up!(future)

presume!(future)

pls_gib!(future)

now_becomes_the!(future)

ayywait!(future)

r#await!(future)

predestined!(future)

kismet!(future)

godot!(future)

wait!(future)

aqait!(future)

示例

use await_macros::back_to_the;

fn main() {
    let future = get_some_future();

    let result = back_to_the!(future);
}

许可证

await_macros 在 MIT 和 Apache 2.0 许可下授权

无运行时依赖