|
| result (T value) noexcept |
|
| result (curl_result::error_type err) noexcept |
|
| result (int64_t code, std::string body) noexcept |
|
| result (json::exception const &ex) noexcept |
|
| result (char const *message) noexcept |
|
| result (error_type err) noexcept |
|
constexpr auto | failure_reason () const noexcept -> failure |
|
auto | to_string () const noexcept -> std::string |
| Retrieves a string representation of the operation result. More...
|
|
constexpr auto | is_successful () const noexcept -> bool |
|
constexpr auto | is_failed () const noexcept -> bool |
|
template<typename U > |
constexpr auto | and_then (std::function< result< U >(T &)> const &func) noexcept -> result< U > |
| Runs a transformation function on a successful result; does nothing on a failed result. More...
|
|
constexpr auto | operator-> () noexcept -> T * |
| Can be used only on successful results.
|
|
constexpr auto | operator* () noexcept -> T & |
| Can be used only on successful results.
|
|
constexpr auto | value () noexcept -> value_type & |
|
template<typename T>
struct pinecone::util::result< T >
Models the possibility of failure for all Cppinecone public API operations.
Cppinecone heavily constrains the types of errors that it allows to be propagated to clients. All operations return a result, allowing the library fine-grained control over failure modes and error handling. Usage of this class can be modified with client-level policies.
- Template Parameters
-
T | the type held in the event of operation success |
Definition at line 157 of file result.hpp.