![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Base class of dpp::coroutine<R>. More...
#include <coroutine.h>
Inheritance diagram for dpp::detail::coroutine::coroutine_base< R >:
Collaboration diagram for dpp::detail::coroutine::coroutine_base< R >:Public Member Functions | |
| coroutine_base ()=default | |
| Default constructor, creates an empty coroutine. More... | |
| coroutine_base (const coroutine_base &)=delete | |
| Copy constructor is disabled. More... | |
| coroutine_base (coroutine_base &&other) noexcept | |
| Move constructor, grabs another coroutine's handle. More... | |
| ~coroutine_base () | |
| Destructor, destroys the handle. More... | |
| coroutine_base & | operator= (const coroutine_base &)=delete |
| Copy assignment is disabled. More... | |
| coroutine_base & | operator= (coroutine_base &&other) noexcept |
| Move assignment, grabs another coroutine's handle. More... | |
| bool | await_ready () const |
| First function called by the standard library when the coroutine is co_await-ed. More... | |
| template<typename T > | |
| handle_t< R > | await_suspend (detail::std_coroutine::coroutine_handle< T > caller) noexcept |
| Second function called by the standard library when the coroutine is co_await-ed. More... | |
| decltype(auto) | await_resume () & |
| Function called by the standard library when the coroutine is resumed. More... | |
| decltype(auto) | await_resume () const & |
| Function called by the standard library when the coroutine is resumed. More... | |
| decltype(auto) | await_resume () && |
| Function called by the standard library when the coroutine is resumed. More... | |
Protected Attributes | |
| detail::coroutine::handle_t< R > | handle {nullptr} |
| Coroutine handle. More... | |
Friends | |
| struct | promise_t< R > |
| Promise has friend access for the constructor. More... | |
Base class of dpp::coroutine<R>.
@warn This class should not be used directly by a user, use dpp::coroutine<R> instead.
|
default |
Default constructor, creates an empty coroutine.
|
delete |
Copy constructor is disabled.
|
inlinenoexcept |
Move constructor, grabs another coroutine's handle.
| other | Coroutine to move the handle from |
|
inline |
Destructor, destroys the handle.
|
inline |
First function called by the standard library when the coroutine is co_await-ed.
| invalid_operation_exception | if the coroutine is empty or finished. |
|
inline |
Function called by the standard library when the coroutine is resumed.
| Throws | any exception thrown or uncaught by the coroutine |
co_await
|
inline |
Function called by the standard library when the coroutine is resumed.
| Throws | any exception thrown or uncaught by the coroutine |
co_await
|
inline |
Function called by the standard library when the coroutine is resumed.
| Throws | any exception thrown or uncaught by the coroutine |
co_await
|
inlinenoexcept |
Second function called by the standard library when the coroutine is co_await-ed.
Stores the calling coroutine in the promise to resume when this coroutine suspends.
| caller | The calling coroutine, now suspended |
|
delete |
Copy assignment is disabled.
|
inlinenoexcept |
Move assignment, grabs another coroutine's handle.
| other | Coroutine to move the handle from |
|
friend |
Promise has friend access for the constructor.
|
protected |
Coroutine handle.