folly::expected_detail::UnexpectedAwaitable

Awaitable that short-circuits a coroutine with an unexpected error.

Synopsis

Declared in <folly/Expected.h>

template<typename Error>
struct UnexpectedAwaitable;

Member Functions

NameDescription
UnexpectedAwaitable [constructor]Wraps an Unexpected to be awaited.
await_ready Reports whether the awaited operation is ready.
await_resume Resumes the coroutine; never actually called for this awaitable.
await_suspend Stores the error into the promise and aborts the coroutine.

Data Members

NameDescription
o_ The error that aborts the coroutine.

Non-Member Functions

NameDescription
::folly::operator co_awaitEnables co_await on an Unexpected to short-circuit with an error.