Skip to content

Commit 827bfe4

Browse files
oli-obkcompiler-errors
authored andcommitted
Document async_fn_traits
1 parent ca44416 commit 827bfe4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# `async_fn_traits`
2+
3+
See Also: [`fn_traits`](../library-features/fn-traits.md)
4+
5+
----
6+
7+
The `async_fn_traits` feature allows for implementation of the [`AsyncFn*`] traits
8+
for creating custom closure-like types that return futures.
9+
10+
[`AsyncFn*`]: ../../std/ops/trait.AsyncFn.html
11+
12+
The main difference to the `Fn*` family of traits is that `AsyncFn` can return a future
13+
that borrows from itself (`FnOnce::Output` has no lifetime parameters, while `AsyncFn::CallFuture` does).

0 commit comments

Comments
 (0)