D++ (DPP)
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...

+ 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...
 
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...
 
decltype(auto) await_resume ()
 Wrapper for the awaitable's await_resume, throws if the task is cancelled. More...
 

Public Attributes

const task::promise_basepromise
 The promise_t object bound to this proxy. More...
 
awaitable
 The inner awaitable being awaited. 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.

◆ 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

◆ 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.

Member Data Documentation

◆ awaitable

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

The inner awaitable being awaited.

◆ promise

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

The promise_t object bound to this proxy.

D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0