#traits #async #future

no-std async_fn_traits

Trait synonyms for “Fn[…]”-trait bounds returning futures

2 releases

0.1.1 Dec 7, 2021
0.1.0 Dec 7, 2021

#2131 in Rust patterns

Download history 8126/week @ 2025-06-11 8734/week @ 2025-06-18 7450/week @ 2025-06-25 9189/week @ 2025-07-02 7576/week @ 2025-07-09 9427/week @ 2025-07-16 9686/week @ 2025-07-23 17177/week @ 2025-07-30 16430/week @ 2025-08-06 20316/week @ 2025-08-13 20152/week @ 2025-08-20 18507/week @ 2025-08-27 24122/week @ 2025-09-03 19901/week @ 2025-09-10 22940/week @ 2025-09-17 25417/week @ 2025-09-24

96,629 downloads per month
Used in 13 crates (12 directly)

MIT/Apache

9KB
141 lines

async_fn_traits

docs.rs crates.io github MIT / Apache 2.0 licensed unsafe forbidden

Trait synonyms for Fn[]-trait bounds returning futures.

E.g. a 2-argument function async fn foo(x: Bar, y: Baz) -> Qux will implement AsyncFn2<Bar, Baz, Output = Qux>.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies