Future specialization for coroutines that return void.
More...
#include <corochain.hpp>
|
void | await_resume () |
template<typename Func> |
auto | Accept (Func func) -> TFuture< void > |
| Registers a continuation to be executed after the coroutine completes.
|
auto | Apply (Func func) -> TFuture< decltype(func(std::declval< void >()))> |
| Applies a function to the result of the coroutine.
|
TFuture< void > | Ignore () |
| Awaits the coroutine and ignores its result.
|
TFutureBase & | operator= (const TFutureBase &)=delete |
bool | await_ready () const |
bool | done () const |
std::coroutine_handle | raw () |
void | await_suspend (std::coroutine_handle<> caller) |
|
using | promise_type |
std::coroutine_handle< TPromise< void > > | Coro |
Future specialization for coroutines that return void.
◆ Accept()
Registers a continuation to be executed after the coroutine completes.
- Template Parameters
-
Func | The type of the continuation function. |
- Parameters
-
func | The function to execute after completion. |
- Returns
- TFuture<void> representing the continuation.
◆ Apply()
Applies a function to the result of the coroutine.
The provided function is applied to the result, and the outcome is wrapped in a new future.
- Template Parameters
-
Func | The type of the function. |
- Parameters
-
func | The function to apply. |
- Returns
- A TFuture wrapping the result of the function call.
◆ Ignore()
Awaits the coroutine and ignores its result.
This is useful when the result is not needed.
- Returns
- TFuture<void> representing the completion.
The documentation for this struct was generated from the following file: