[−][src]Module act_zero::async_fn
This module contains tools for dealing with async functions. These are similar to the
FnOnce
trait from std
, but they allow the lifetime of the returned future to be
bound by the lifetime of the argument. The different variants correspond to the
different reference types (&T
, &mut T
) but all variants consume self
like FnOnce
.
For simplicity, only one argument is allowed. In addition, the returned future and its
output are assumed to be Send + 'static
.
Note: typically you will not need to use these tools. The exist primarily for use by
the expanded macro code from #[act_zero]
.
Structs
AsyncMap | Return type of |
BindOutput | Return type of |
Closure | Rust does not support async closures, and is incapable of inferring the correct lifetimes
for closures returning an |
Traits
AsyncFnOnce | Trait for async methods which take |
AsyncMutFnOnce | Trait for async methods which take |
ClosureFn | We can't even directly express the lifetime bounds of an |
ClosureFnMut | We can't even directly express the lifetime bounds of an |