|
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 72 of file status.hpp.
|
inline |
Definition at line 74 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 82 of file status.hpp.
References lightgraph::Status::error().
|
inline |
True when result status is success.
Definition at line 89 of file status.hpp.
References lightgraph::Status::ok().
Referenced by lightgraph::Result< T >::operator bool().
|
inlineexplicit |
Definition at line 91 of file status.hpp.
References lightgraph::Result< T >::ok().
|
inline |
Access the operation status.
Definition at line 105 of file status.hpp.
|
inline |
Definition at line 100 of file status.hpp.
|
inline |
Access the contained value.
Callers should only use this when ok() is true.
Definition at line 98 of file status.hpp.