16#include "pw_async2/coro.h"
17#include "pw_async2/dispatcher.h"
18#include "pw_function/function.h"
31 : coro_(std::move(coro)), or_else_(std::move(or_else)) {}
38 coro_ = std::move(coro);
46 or_else_ = std::move(or_else);
Definition: coro_or_else_task.h:26
void SetErrorHandler(pw::Function< void(Status)> &&or_else)
Definition: coro_or_else_task.h:44
CoroOrElseTask(Coro< Status > &&coro, pw::Function< void(Status)> &&or_else)
Definition: coro_or_else_task.h:30
Poll DoPend(Context &cx) final
Definition: coro_or_else_task.h:50
void SetCoro(Coro< Status > &&coro)
Definition: coro_or_else_task.h:36
bool IsRegistered() const
constexpr bool IsPending() const noexcept
Returns whether or not this value is Pending.
Definition: poll.h:136
constexpr PendingType Pending()
Returns a value indicating that an operation was not yet able to complete.
Definition: poll.h:271
constexpr Poll Ready()
Returns a value indicating completion.
Definition: poll.h:255
fit::function_impl< function_internal::config::kInlineCallableSize, !function_internal::config::kEnableDynamicAllocation, FunctionType, PW_FUNCTION_DEFAULT_ALLOCATOR_TYPE > Function
Definition: function.h:73