9 template<
typename Ctx,
typename T>
20 , status_(std::move(
status))
25 inline operator bool() {
return status_.
is_ok(); }
29 inline const Ctx&
context() {
return ctx_; }
38 template<
typename Ctx,
typename T>
bool is_ok() const
Returns true if no errors occurs.
bool is_err() const
Returns true if an errors occurs.
Definition: async_result.hpp:7
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:39
Definition: async_result.hpp:11
const Ctx & context()
Definition: async_result.hpp:29
AsyncResult(Ctx ctx, Status status, const T *data)
Definition: async_result.hpp:18
const T * operator->() const
Definition: async_result.hpp:26
bool is_err() const
Returns true if an errors occurs.
Definition: async_result.hpp:35
const Status & status() const
Definition: async_result.hpp:27
bool is_ok() const
Returns true if no errors occurs.
Definition: async_result.hpp:32