Loading...
Searching...
No Matches
sdbus::Awaitable< T > Class Template Reference

`#include <Awaitable.h>`

## Detailed Description

template<typename T>
class sdbus::Awaitable< T >

A C++20 coroutine awaitable that represents an asynchronous operation. Allows suspending a coroutine until a D-Bus method call completes, then resuming with the result or exception.

This is not a full-fledged coroutine type, but a simple awaitable that can be used with co_await to retrieve results of async D-Bus calls. This is independent of any specific coroutine framework or scheduler, as it relies on the D-Bus callback mechanism to resume the coroutine.

You most likely don't need to use this class directly. Instead, use the respective low-level or high-level API functions that return an Awaitable instance, such as IProxy::callMethodAsync with with_awaitable_t tag, or the .getResultAsAwaitable() methods of the high-level API.

The class represents nothing, i.e. is a simple placeholder class, if the API is used as C++17 or with a standard library not supporting coroutines.

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

- include/sdbus-c++/Awaitable.h