![]() |
Gossip 1.1
|
Wrapper return value. More...
#include <GossipClient.h>
Public Member Functions | |
Result (bool suc, std::string error_text, T value={}) | |
bool | isSucceed () const |
std::string | errorText () const |
T | value () const |
Wrapper return value.
Class Result contains rpc status and rpc result. User can identify why an operation is failed.
T | The type of rpc result |
|
inlineexplicit |
Constructor of Result. If an operation succeed, error_text will be empty. Otherwise, value will be empty.
suc | Is operation succeeded |
error_text | If operation failed, its failed reason |
value | If operation succeeded, its returned value |
|
inline |
Get the failed reason of operation.
|
inline |
Check is operation succeeded.
|
inline |
Get the result of operation.