D++ (DPP)  10.0.30
C++ Discord API Bot Library
dpp::detail::task::promise_base::proxy_awaiter< A > Struct Template Reference

Proxy awaitable that wraps any co_await inside the task and checks for cancellation on resumption. More...

#include "task.h"

Collaboration diagram for dpp::detail::task::promise_base::proxy_awaiter< A >:

Public Member Functions

bool await_ready () noexcept(noexcept(awaitable.await_ready()))
 Wrapper for the awaitable's await_ready. More...
 
decltype(auto) await_resume ()
 Wrapper for the awaitable's await_resume, throws if the task is cancelled. More...
 
template<typename T >
decltype(auto) await_suspend (T &&handle) noexcept(noexcept(awaitable.await_suspend(std::forward< T >(handle))))
 Wrapper for the awaitable's await_suspend. More...
 

Public Attributes

awaitable
 The inner awaitable being awaited. More...
 
const task::promise_basepromise
 The promise_t object bound to this proxy. More...
 

Detailed Description

template<typename A>
struct dpp::detail::task::promise_base::proxy_awaiter< A >

Proxy awaitable that wraps any co_await inside the task and checks for cancellation on resumption.

See also
await_transform

Member Function Documentation

◆ await_ready()

template<typename A >
bool dpp::detail::task::promise_base::proxy_awaiter< A >::await_ready ( )
inlinenoexcept

Wrapper for the awaitable's await_ready.

References dpp::detail::task::promise_base::proxy_awaiter< A >::awaitable.

◆ await_resume()

template<typename A >
decltype(auto) dpp::detail::task::promise_base::proxy_awaiter< A >::await_resume ( )
inline

Wrapper for the awaitable's await_resume, throws if the task is cancelled.

Exceptions
dpp::task_cancelled_exceptionIf the task was cancelled

References dpp::detail::task::promise_base::proxy_awaiter< A >::awaitable, dpp::detail::task::promise_base::cancelled, and dpp::detail::task::promise_base::proxy_awaiter< A >::promise.

◆ await_suspend()

template<typename A >
template<typename T >
decltype(auto) dpp::detail::task::promise_base::proxy_awaiter< A >::await_suspend ( T &&  handle)
inlinenoexcept

Wrapper for the awaitable's await_suspend.

References dpp::detail::task::promise_base::proxy_awaiter< A >::awaitable.

Member Data Documentation

◆ awaitable

◆ promise

template<typename A >
const task::promise_base& dpp::detail::task::promise_base::proxy_awaiter< A >::promise

The documentation for this struct was generated from the following file: