|
Lightgraph
C++17 light-graph engine API reference
|
#include <status.hpp>
Public Member Functions | |
| Result (T value, Status status=Status::success()) | |
| bool | ok () const |
| True when result status is success. | |
| operator bool () const | |
| const T & | value () const |
| Access the contained value. | |
| T & | value () |
| const Status & | status () const |
| Access the operation status. | |
Static Public Member Functions | |
| static Result< T > | error (ErrorCode code, std::string message) |
| Construct an error result. | |
Definition at line 70 of file status.hpp.
|
inline |
Definition at line 72 of file status.hpp.
|
inlinestatic |
Construct an error result.
The value is default-constructed and should be ignored when ok() is false.
Definition at line 80 of file status.hpp.
References lightgraph::Status::error().
|
inline |
True when result status is success.
Definition at line 87 of file status.hpp.
References lightgraph::Status::ok().
Referenced by lightgraph::Result< T >::operator bool().
|
inlineexplicit |
Definition at line 89 of file status.hpp.
References lightgraph::Result< T >::ok().
Access the operation status.
Definition at line 103 of file status.hpp.
|
inline |
Definition at line 98 of file status.hpp.
Access the contained value.
Callers should only use this when ok() is true.
Definition at line 96 of file status.hpp.