folly::expected_detail::ExpectedAwaitable

Awaitable that unwraps an Expected inside a coroutine.

Synopsis

Declared in <folly/Expected.h>

template<
    typename Value,
    typename Error>
struct ExpectedAwaitable;

Member Functions

NameDescription
ExpectedAwaitable [constructor]Wraps an Expected to be awaited.
await_ready Reports whether the Expected already holds a value.
await_resume Yields the contained value to the awaiting expression.
await_suspend Propagates the error into the promise and aborts the coroutine.

Data Members

NameDescription
o_ The awaited Expected.

Non-Member Functions

NameDescription
::folly::operator co_awaitEnables co_await on an Expected to unwrap its value or propagate its error.