Document async_fn_traits
This commit is contained in:
parent
ca44416023
commit
827bfe4154
1 changed files with 13 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
# `async_fn_traits`
|
||||
|
||||
See Also: [`fn_traits`](../library-features/fn-traits.md)
|
||||
|
||||
----
|
||||
|
||||
The `async_fn_traits` feature allows for implementation of the [`AsyncFn*`] traits
|
||||
for creating custom closure-like types that return futures.
|
||||
|
||||
[`AsyncFn*`]: ../../std/ops/trait.AsyncFn.html
|
||||
|
||||
The main difference to the `Fn*` family of traits is that `AsyncFn` can return a future
|
||||
that borrows from itself (`FnOnce::Output` has no lifetime parameters, while `AsyncFn::CallFuture` does).
|
Loading…
Add table
Reference in a new issue