| D++ (DPP) C++ Discord API Bot Library

Search
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 >:
[legend]

## 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

A | awaitable
| The inner awaitable being awaited.
const promise_base & | promise
| 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 | ( |  | ) |

inline nodiscard noexcept

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_exception | If 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 | ) |

inline nodiscard noexcept

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.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0