D++ (DPP)
C++ Discord API Bot Library
|
Awaiter returned by co_await. More...
Public Member Functions | |
bool | await_ready () const |
First function called by the standard library when co_await-ing this object. More... | |
bool | await_suspend (detail::std_coroutine::coroutine_handle<> handle) |
Second function called by the standard library when co_await-ing this object. More... | |
T | await_resume () |
Third and final function called by the standard library when co_await-ing this object, after resuming. More... | |
Public Attributes | |
Derived | awaitable_obj |
Awaiter returned by co_await.
Contains the await_ready, await_suspend and await_resume functions required by the C++ standard. This class is CRTP-like, in that it will refer to an object derived from awaitable.
Derived | Type of reference to refer to the awaitable. |
bool dpp::awaitable< T >::awaiter< Derived >::await_ready |
First function called by the standard library when co_await-ing this object.
dpp::logic_exception | If the awaitable's valid() would return false. |
T dpp::awaitable< T >::awaiter< Derived >::await_resume |
Third and final function called by the standard library when co_await-ing this object, after resuming.
? | Any exception that occured during the retrieval of the value will be thrown |
bool dpp::awaitable< T >::awaiter< Derived >::await_suspend | ( | detail::std_coroutine::coroutine_handle<> | handle | ) |
Second function called by the standard library when co_await-ing this object.
dpp::logic_exception | If the awaitable's valid() would return false. At this point the coroutine frame was allocated and suspended. |
Derived dpp::awaitable< T >::awaiter< Derived >::awaitable_obj |