D++ (DPP)
C++ Discord API Bot Library
|
Promise type for coroutine. More...
Public Member Functions | |
final_awaiter< R > | final_suspend () const noexcept |
Function called by the standard library when reaching the end of a coroutine. More... | |
std_coroutine::suspend_always | initial_suspend () const noexcept |
Function called by the standard library when the coroutine start. More... | |
void | unhandled_exception () noexcept |
Function called when an exception escapes the coroutine. More... | |
void | return_value (R &&expr) noexcept(std::is_nothrow_move_constructible_v< R >) requires std |
Function called by the standard library when the coroutine co_returns a value. More... | |
dpp::coroutine< R > | get_return_object () |
Function called to get the coroutine object. More... | |
Public Attributes | |
std_coroutine::coroutine_handle | parent {nullptr} |
Handle of the coroutine co_await-ing this coroutine. More... | |
std::optional< R > | result {} |
Return value of the coroutine. More... | |
std::exception_ptr | exception {nullptr} |
Pointer to an uncaught exception thrown by the coroutine. More... | |
Promise type for coroutine.
|
noexcept |
Function called by the standard library when reaching the end of a coroutine.
|
inline |
Function called to get the coroutine object.
|
inlinenoexcept |
Function called by the standard library when the coroutine start.
|
inlinenoexcept |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
Function called by the standard library when the coroutine co_returns a value.
Stores the value internally to hand to the caller when it resumes.
expr | The value given to co_return |
|
inlinenoexcept |
Function called when an exception escapes the coroutine.
Stores the exception to throw to the co_await-er
std::exception_ptr dpp::detail::coroutine::promise_t< R >::exception {nullptr} |
Pointer to an uncaught exception thrown by the coroutine.
std_coroutine::coroutine_handle dpp::detail::coroutine::promise_t< R >::parent {nullptr} |
Handle of the coroutine co_await-ing this coroutine.
std::optional<R> dpp::detail::coroutine::promise_t< R >::result {} |
Return value of the coroutine.