![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Implementation of promise_type for dpp's coroutines. More...
#include <coro.h>
Collaboration diagram for dpp::promise:Public Member Functions | |
| promise ()=default | |
| Construct a new promise object. More... | |
| promise (const dpp::event_dispatch_t &ev) | |
| Construct a new promise object. More... | |
| task | get_return_object () |
| Get the return object. More... | |
| std::suspend_never | initial_suspend () noexcept |
| Function called when the coroutine is first suspended, never suspends. More... | |
| std::suspend_never | final_suspend () noexcept |
| Function called when the coroutine reaches its last suspension point. More... | |
| void | return_void () noexcept |
| Function called when the coroutine returns nothing. More... | |
| void | unhandled_exception () |
| Function called when coroutine throws a un-catch-ed exception. Does nothing. More... | |
Public Attributes | |
| cluster * | bot = nullptr |
| A pointer to the cluster making the requests in the coroutine. More... | |
| confirmation_callback_t | callback |
| The result of the last co_await-ed function. More... | |
Implementation of promise_type for dpp's coroutines.
|
default |
Construct a new promise object.
|
inline |
Construct a new promise object.
| ev | Base type of all events, only used to get the dpp::cluster pointer |
|
inlinenoexcept |
Function called when the coroutine reaches its last suspension point.
|
inlinenoexcept |
Function called when the coroutine is first suspended, never suspends.
|
inlinenoexcept |
Function called when the coroutine returns nothing.
|
inline |
Function called when coroutine throws a un-catch-ed exception. Does nothing.
| cluster* dpp::promise::bot = nullptr |
A pointer to the cluster making the requests in the coroutine.
| confirmation_callback_t dpp::promise::callback |
The result of the last co_await-ed function.