|
Lightgraph
C++17 light-graph engine API reference
|
Operation status object. More...
#include <status.hpp>
Public Member Functions | |
| Status ()=default | |
| Status (ErrorCode code, std::string message) | |
| bool | ok () const |
True when status code is ErrorCode::Ok. | |
| operator bool () const | |
| ErrorCode | code () const |
| Return the stable error code. | |
| const std::string & | message () const |
| Return the human-readable error message. | |
Static Public Member Functions | |
| static Status | success () |
| Construct a success status. | |
| static Status | error (ErrorCode code, std::string message) |
| Construct an error status with code and message. | |
Operation status object.
Definition at line 30 of file status.hpp.
|
inline |
Definition at line 34 of file status.hpp.
|
inline |
Construct an error status with code and message.
Definition at line 44 of file status.hpp.
References code(), message(), and Status().
Referenced by lightgraph::Result< T >::error().
|
inline |
Return the human-readable error message.
Definition at line 63 of file status.hpp.
Referenced by error().
|
inline |
True when status code is ErrorCode::Ok.
Definition at line 51 of file status.hpp.
References lightgraph::Ok.
Referenced by lightgraph::Result< T >::ok(), and operator bool().
|
inlineexplicit |
Definition at line 53 of file status.hpp.
References ok().