#include <userver/utils/result_store.hpp>
Simple value/exception store
Definition at line 19 of file result_store.hpp.
Public Member Functions | |
T | Retrieve () |
Retrieves the stored value or rethrows the stored exception. | |
const T & | Get () const & |
Returns the stored value or rethrows the stored exception. | |
void | SetValue (const T &) |
Stores a value. | |
void | SetValue (T &&) |
Stores a value. | |
void | SetException (std::exception_ptr &&) noexcept |
Stores an exception. | |
const T & utils::ResultStore< T >::Get | ( | ) | const & |
Returns the stored value or rethrows the stored exception.
std::logic_error | if no value/exception stored |
Definition at line 76 of file result_store.hpp.
T utils::ResultStore< T >::Retrieve | ( | ) |
Retrieves the stored value or rethrows the stored exception.
std::logic_error | if no value/exception stored |
Definition at line 69 of file result_store.hpp.
|
noexcept |
Stores an exception.
Definition at line 93 of file result_store.hpp.
void utils::ResultStore< T >::SetValue | ( | const T & | value | ) |
Stores a value.
Definition at line 83 of file result_store.hpp.
void utils::ResultStore< T >::SetValue | ( | T && | value | ) |
Stores a value.
Definition at line 88 of file result_store.hpp.