D++ (DPP)
C++ Discord API Bot Library
Loading...
Searching...
No Matches
dpp::detail::task::promise_base< R >::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< R >::proxy_awaiter< A >:

Public Member Functions

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

Public Attributes

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

Detailed Description

template<typename R>
template<typename A>
struct dpp::detail::task::promise_base< R >::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 R>
template<typename A>
bool dpp::detail::task::promise_base< R >::proxy_awaiter< A >::await_ready ( )
inlinenodiscardnoexcept

Wrapper for the awaitable's await_ready.

◆ await_resume()

template<typename R>
template<typename A>
decltype(auto) dpp::detail::task::promise_base< R >::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 R>
template<typename A>
template<typename T>
decltype(auto) dpp::detail::task::promise_base< R >::proxy_awaiter< A >::await_suspend ( T handle)
inlinenodiscardnoexcept

Wrapper for the awaitable's await_suspend.

Member Data Documentation

◆ awaitable

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

The inner awaitable being awaited.

◆ promise

template<typename R>
template<typename A>
const promise_base& dpp::detail::task::promise_base< R >::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